diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 44ff686c4af36d..e693e22c2850be 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -19,6 +19,8 @@ AccessControlEntry accessor AccountLogin acdbc +ack +ACK ACKed ACL ACLs @@ -596,6 +598,7 @@ Gradle gradlew GroupId GroupKeyManagement +Groupcast groupKeySecurityPolicy groupKeySetID groupsettings @@ -649,6 +652,7 @@ ignoreQueryImage ihex IlluminanceMeasurement IM +IsInitiator imager imagetool imageUri @@ -828,6 +832,7 @@ mdash MDNS MediaInput MediaPlayback +MediaTek mem memdf MemMonitoring @@ -1375,6 +1380,7 @@ unfocus Unicast UniFlash UnitLocalization +Unencrypted unpair unprovisioned untrusted @@ -1394,6 +1400,7 @@ userConsentState userguide USERINTERFACE UserLabel +Unsecure usermod usr UTF diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index fba0fc1d507e49..978bc5ce8d7737 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -25,7 +25,7 @@ concurrency: jobs: zap_templates: name: ZAP templates generation - timeout-minutes: 60 + timeout-minutes: 90 runs-on: ubuntu-20.04 container: @@ -55,7 +55,6 @@ jobs: npm rebuild canvas --update-binary npm run build-spa - name: Generate all - timeout-minutes: 45 run: scripts/tools/zap_regen_all.py - name: Check for uncommited changes run: | diff --git a/.gitmodules b/.gitmodules index 00b5a00e494d2c..3704657be45a26 100644 --- a/.gitmodules +++ b/.gitmodules @@ -273,3 +273,18 @@ url = https://github.com/bouffalolab/bl_iot_sdk.git branch = master platforms = bouffalolab,bl602 +[submodule "third_party/mt793x_sdk/filogic"] + path = third_party/mt793x_sdk/filogic + url = https://github.com/MediaTek-Labs/genio-matter-bsp.git + branch = main + platforms = genio +[submodule "third_party/mt793x_sdk/mDNSResponder"] + path = third_party/mt793x_sdk/mDNSResponder + url = https://github.com/matter-mtk/genio-matter-mdnsresponder.git + branch = main + platforms = genio +[submodule "third_party/mt793x_sdk/lwip"] + path = third_party/mt793x_sdk/lwip + url = https://github.com/matter-mtk/genio-matter-lwip.git + branch = main + platforms = genio diff --git a/BUILD.gn b/BUILD.gn index c341a32b2f6f89..e5b64a2f62e4d5 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -288,6 +288,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { # Set this to true to enable mw320 builds by default. enable_mw320_builds = false + + # Set this to true to enable genio builds by default. + enable_genio_builds = false } declare_args() { @@ -397,6 +400,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { # Build the mw320 shell app example. enable_mw320_shell_build = enable_mw320_builds + # Build the genio shell app example. + enable_genio_shell_app_build = enable_genio_builds + enable_fake_tests = enable_default_builds && host_os == "linux" enable_tizen_lighting_app = enable_tizen_builds @@ -696,6 +702,14 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { extra_build_deps += [ ":bl702_shell" ] } + if (enable_genio_shell_app_build) { + group("genio_shell_app") { + deps = [ "${chip_root}/examples/shell/genio(${chip_root}/config/genio/toolchain:genio_shell_app)" ] + } + + extra_build_deps += [ ":genio_shell_app" ] + } + group("default") { deps = extra_build_deps + builds } diff --git a/build_overrides/mt793x_sdk.gni b/build_overrides/mt793x_sdk.gni new file mode 100644 index 00000000000000..a9a79daf1c6a91 --- /dev/null +++ b/build_overrides/mt793x_sdk.gni @@ -0,0 +1,18 @@ +# Copyright (c) 2022 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. + +declare_args() { + # Root directory for mt793x SDK build files. + mt793x_sdk_build_root = "//third_party/mt793x_sdk" +} diff --git a/config/genio/BUILD.gn b/config/genio/BUILD.gn new file mode 100644 index 00000000000000..7b2bdb9b8bf847 --- /dev/null +++ b/config/genio/BUILD.gn @@ -0,0 +1,37 @@ +# 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. + +# Options from standalone-chip.mk that differ from configure defaults. These +# options are used from examples/. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +import("${chip_root}/build/chip/tests.gni") + +declare_args() { + chip_build_pw_rpc_lib = false +} + +group("genio") { + deps = [ "${chip_root}/src/lib" ] + + if (chip_build_pw_rpc_lib) { + deps += [ "//lib/pw_rpc" ] + } + + if (chip_build_tests) { + deps += [ "${chip_root}/src:tests" ] + } +} diff --git a/config/genio/args.gni b/config/genio/args.gni new file mode 100644 index 00000000000000..074ff1481f82ea --- /dev/null +++ b/config/genio/args.gni @@ -0,0 +1,33 @@ +# Copyright (c) 2022 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. + +# Options from standalone-chip.mk that differ from configure defaults. These +# options are used from examples/. + +chip_project_config_include = "" +chip_system_project_config_include = "" +chip_ble_project_config_include = "" + +mbedtls_target = "//mbedtls:mbedtls" +lwip_platform = "external" + +chip_build_tests = true + +chip_inet_config_enable_tcp_endpoint = true +chip_inet_config_enable_udp_endpoint = true + +custom_toolchain = "//third_party/connectedhomeip/config/genio/toolchain:genio" + +pw_build_PIP_CONSTRAINTS = + [ "//third_party/connectedhomeip/scripts/constraints.txt" ] diff --git a/config/genio/toolchain/BUILD.gn b/config/genio/toolchain/BUILD.gn new file mode 100644 index 00000000000000..afa83c232f818e --- /dev/null +++ b/config/genio/toolchain/BUILD.gn @@ -0,0 +1,25 @@ +# Copyright (c) 2022 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") +import("//build_overrides/chip.gni") + +import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni") + +arm_toolchain("genio_shell_app") { + toolchain_args = { + current_os = "freertos" + import("${chip_root}/examples/shell/genio/args.gni") + } +} diff --git a/credentials/development/commissioner_dut/invalid_paa/cd.der b/credentials/development/commissioner_dut/invalid_paa/cd.der new file mode 100644 index 00000000000000..3db6854627ab38 Binary files /dev/null and b/credentials/development/commissioner_dut/invalid_paa/cd.der differ diff --git a/credentials/development/commissioner_dut/invalid_paa/dac-Cert.der b/credentials/development/commissioner_dut/invalid_paa/dac-Cert.der new file mode 100644 index 00000000000000..54646763f78aa9 Binary files /dev/null and b/credentials/development/commissioner_dut/invalid_paa/dac-Cert.der differ diff --git a/credentials/development/commissioner_dut/invalid_paa/dac-Cert.pem b/credentials/development/commissioner_dut/invalid_paa/dac-Cert.pem new file mode 100644 index 00000000000000..2f20de3ef87ed0 --- /dev/null +++ b/credentials/development/commissioner_dut/invalid_paa/dac-Cert.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBzjCCAXSgAwIBAgIIWRRjypC2cxkwCgYIKoZIzj0EAwIwMDEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTAgFw0yMTA2Mjgx +NDIzNDNaGA85OTk5MTIzMTIzNTk1OVowRjEYMBYGA1UEAwwPTWF0dGVyIFRlc3Qg +REFDMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQBgqJ8AgIMBDgwMDAw +WTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQ1lnUF27XW2SR0MYjYBm2BSgDGS3TT +bi6A0tsHKjuB/8Y9bU3bAT5+gNnz6IIgXSt3949rRlcN4gN5Sux5Td8Fo2AwXjAM +BgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIHgDAdBgNVHQ4EFgQU3JVLDvstIQgd +qOejQv2K2nz5m2IwHwYDVR0jBBgwFoAU44aqTINKlOXlPPM+5w93H6P7TAAwCgYI +KoZIzj0EAwIDSAAwRQIhAJbqcL/1bbwLjHtzVz+BIVmUVwq7QXS7A6NsL7CgMiZy +AiAyLK2B8V7wI2VPppLeWQuZt5Aso89n7+J/gJaIKnBKhw== +-----END CERTIFICATE----- diff --git a/credentials/development/commissioner_dut/invalid_paa/dac-Key.der b/credentials/development/commissioner_dut/invalid_paa/dac-Key.der new file mode 100644 index 00000000000000..de36dd959b8fd5 Binary files /dev/null and b/credentials/development/commissioner_dut/invalid_paa/dac-Key.der differ diff --git a/credentials/development/commissioner_dut/invalid_paa/dac-Key.pem b/credentials/development/commissioner_dut/invalid_paa/dac-Key.pem new file mode 100644 index 00000000000000..49efe8fff74910 --- /dev/null +++ b/credentials/development/commissioner_dut/invalid_paa/dac-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIJbEKXtKCVCXl0KbWX+6WlxDIcxH649NH1Nm33Prxqs6oAoGCCqGSM49 +AwEHoUQDQgAENZZ1Bdu11tkkdDGI2AZtgUoAxkt0024ugNLbByo7gf/GPW1N2wE+ +foDZ8+iCIF0rd/ePa0ZXDeIDeUrseU3fBQ== +-----END EC PRIVATE KEY----- diff --git a/credentials/development/commissioner_dut/invalid_paa/paa-Cert.pem b/credentials/development/commissioner_dut/invalid_paa/paa-Cert.pem new file mode 100644 index 00000000000000..093bb1080335bc --- /dev/null +++ b/credentials/development/commissioner_dut/invalid_paa/paa-Cert.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIB0DCCAXagAwIBAgIIOOfO8k+viIgwCgYIKoZIzj0EAwIwOTE3MDUGA1UEAwwu +SW52YWxpZCAoTm90IFJlZ2lzdGVyZWQgaW4gdGhlIERDTCkgTWF0dGVyIFBBQTAg +Fw0yMTA2MjgxNDIzNDNaGA85OTk5MTIzMTIzNTk1OVowOTE3MDUGA1UEAwwuSW52 +YWxpZCAoTm90IFJlZ2lzdGVyZWQgaW4gdGhlIERDTCkgTWF0dGVyIFBBQTBZMBMG +ByqGSM49AgEGCCqGSM49AwEHA0IABPpJ2vGCmLL490OZuD1htkMjRuSOc5kCb3lx +bFxwmk66gvXU8Yocg3BvqK+9WWC6JBlgzvviw93276bvpHGpMYajZjBkMBIGA1Ud +EwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBQrDv6LP/qE +lgvYk8SvEXFnR+BIpTAfBgNVHSMEGDAWgBQrDv6LP/qElgvYk8SvEXFnR+BIpTAK +BggqhkjOPQQDAgNIADBFAiB/D0/Pz+Fz+SU6mNOjvPKcGlZIPe+FRDGI5uqI8rX2 +PwIhAOyShTFQMhNfy+1TnWRbwm/ShROaLr1Zcj7nLRczeGjD +-----END CERTIFICATE----- diff --git a/credentials/development/commissioner_dut/invalid_paa/paa-Key.pem b/credentials/development/commissioner_dut/invalid_paa/paa-Key.pem new file mode 100644 index 00000000000000..1f464846ea9e77 --- /dev/null +++ b/credentials/development/commissioner_dut/invalid_paa/paa-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIFY+k2145+Tfyl9Stq08M5H+SieAPCwwoOLg1NS8s2TqoAoGCCqGSM49 +AwEHoUQDQgAE+kna8YKYsvj3Q5m4PWG2QyNG5I5zmQJveXFsXHCaTrqC9dTxihyD +cG+or71ZYLokGWDO++LD3fbvpu+kcakxhg== +-----END EC PRIVATE KEY----- diff --git a/credentials/development/commissioner_dut/invalid_paa/pai-Cert.der b/credentials/development/commissioner_dut/invalid_paa/pai-Cert.der new file mode 100644 index 00000000000000..28fa817118a07c Binary files /dev/null and b/credentials/development/commissioner_dut/invalid_paa/pai-Cert.der differ diff --git a/credentials/development/commissioner_dut/invalid_paa/pai-Cert.pem b/credentials/development/commissioner_dut/invalid_paa/pai-Cert.pem new file mode 100644 index 00000000000000..7457aeecbade5c --- /dev/null +++ b/credentials/development/commissioner_dut/invalid_paa/pai-Cert.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIByDCCAW2gAwIBAgIIVH5lccL+7gYwCgYIKoZIzj0EAwIwOTE3MDUGA1UEAwwu +SW52YWxpZCAoTm90IFJlZ2lzdGVyZWQgaW4gdGhlIERDTCkgTWF0dGVyIFBBQTAg +Fw0yMTA2MjgxNDIzNDNaGA85OTk5MTIzMTIzNTk1OVowMDEYMBYGA1UEAwwPTWF0 +dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTBZMBMGByqGSM49AgEG +CCqGSM49AwEHA0IABJTSFb4sA9AkXurgPmWCT2maCtyOp8AaqS6dlms2IehJKykQ +j8u1lC4GM1u0iYwhj820yadRtGRmww0cNgjQrQejZjBkMBIGA1UdEwEB/wQIMAYB +Af8CAQAwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTjhqpMg0qU5eU88z7nD3cf +o/tMADAfBgNVHSMEGDAWgBQrDv6LP/qElgvYk8SvEXFnR+BIpTAKBggqhkjOPQQD +AgNJADBGAiEA4CLir/Rmk9mDUS71Jrteov7tCIT9eXrFGUTPkoW+6zcCIQDEhmKi +4hXiW6WC8eXcUxS6kYvEoAKI+kic9A00szhNkg== +-----END CERTIFICATE----- diff --git a/credentials/development/commissioner_dut/invalid_paa/pai-Key.der b/credentials/development/commissioner_dut/invalid_paa/pai-Key.der new file mode 100644 index 00000000000000..7b7536af4ab365 Binary files /dev/null and b/credentials/development/commissioner_dut/invalid_paa/pai-Key.der differ diff --git a/credentials/development/commissioner_dut/invalid_paa/pai-Key.pem b/credentials/development/commissioner_dut/invalid_paa/pai-Key.pem new file mode 100644 index 00000000000000..d689531cecacbc --- /dev/null +++ b/credentials/development/commissioner_dut/invalid_paa/pai-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIHOVwVthXM49128hkyBUFt/P5rCpOxBikVZ1HyiTyV90oAoGCCqGSM49 +AwEHoUQDQgAElNIVviwD0CRe6uA+ZYJPaZoK3I6nwBqpLp2WazYh6EkrKRCPy7WU +LgYzW7SJjCGPzbTJp1G0ZGbDDRw2CNCtBw== +-----END EC PRIVATE KEY----- diff --git a/credentials/development/commissioner_dut/invalid_paa/test_case_vector.json b/credentials/development/commissioner_dut/invalid_paa/test_case_vector.json new file mode 100644 index 00000000000000..74f9d24fe18c1f --- /dev/null +++ b/credentials/development/commissioner_dut/invalid_paa/test_case_vector.json @@ -0,0 +1,9 @@ +{ + "description": "PAI Test Vector: Invalid CMS Signature.", + "is_success_case": "false", + "dac_cert": "308201ce30820174a0030201020208591463ca90b67319300a06082a8648ce3d04030230303118301606035504030c0f4d617474657220546573742050414931143012060a2b0601040182a27c02010c04464646313020170d3231303632383134323334335a180f39393939313233313233353935395a30463118301606035504030c0f4d617474657220546573742044414331143012060a2b0601040182a27c02010c044646463131143012060a2b0601040182a27c02020c04383030303059301306072a8648ce3d020106082a8648ce3d0301070342000435967505dbb5d6d924743188d8066d814a00c64b74d36e2e80d2db072a3b81ffc63d6d4ddb013e7e80d9f3e882205d2b77f78f6b46570de203794aec794ddf05a360305e300c0603551d130101ff04023000300e0603551d0f0101ff040403020780301d0603551d0e04160414dc954b0efb2d21081da8e7a342fd8ada7cf99b62301f0603551d23041830168014e386aa4c834a94e5e53cf33ee70f771fa3fb4c00300a06082a8648ce3d040302034800304502210096ea70bff56dbc0b8c7b73573f81215994570abb4174bb03a36c2fb0a03226720220322cad81f15ef023654fa692de590b99b7902ca3cf67efe27f8096882a704a87", + "pai_cert": "308201c83082016da0030201020208547e6571c2feee06300a06082a8648ce3d04030230393137303506035504030c2e496e76616c696420284e6f74205265676973746572656420696e207468652044434c29204d6174746572205041413020170d3231303632383134323334335a180f39393939313233313233353935395a30303118301606035504030c0f4d617474657220546573742050414931143012060a2b0601040182a27c02010c04464646313059301306072a8648ce3d020106082a8648ce3d0301070342000494d215be2c03d0245eeae03e65824f699a0adc8ea7c01aa92e9d966b3621e8492b29108fcbb5942e06335bb4898c218fcdb4c9a751b46466c30d1c3608d0ad07a366306430120603551d130101ff040830060101ff020100300e0603551d0f0101ff040403020106301d0603551d0e04160414e386aa4c834a94e5e53cf33ee70f771fa3fb4c00301f0603551d230418301680142b0efe8b3ffa84960bd893c4af11716747e048a5300a06082a8648ce3d0403020349003046022100e022e2aff46693d983512ef526bb5ea2feed0884fd797ac51944cf9285beeb37022100c48662a2e215e25ba582f1e5dc5314ba918bc4a00288fa489cf40d34b3384d92", + "certification_declaration": "3081e906092a864886f70d010702a081db3081d8020103310d300b0609608648016503040201304506092a864886f70d010701a0380436152400012501f1ff360205008018250334122c04135a494732303134315a423333303030312d32342405002406002507769824080018317d307b020103801462fa823359acfaa9963e1cfa140addf504f37160300b0609608648016503040201300a06082a8648ce3d040302044730450221009537f838ebfd9f8b1f26b4c207098ec082928254e8db72fc32f8a870ef97563a02203c59748c2c49d7222b58088c3689127a2df28aa8ae8320bd3c82fdcf01dd6044", + "dac_private_key": "96c4297b4a09509797429b597fba5a5c4321cc47eb8f4d1f5366df73ebc6ab3a", + "dac_public_key": "0435967505dbb5d6d924743188d8066d814a00c64b74d36e2e80d2db072a3b81ffc63d6d4ddb013e7e80d9f3e882205d2b77f78f6b46570de203794aec794ddf05" +} diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index 918de3cb7594fa..ad92123d5795e7 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -73,11 +73,35 @@ void NetWorkCommissioningInstInit() emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); } +void OnIdentifyTriggerEffect(Identify * identify) +{ + switch (identify->mCurrentEffectIdentifier) + { + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + break; + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + break; + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + break; + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: + ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + break; + default: + ChipLogProgress(Zcl, "No identifier effect"); + break; + } + return; +} + Identify gIdentify0 = { chip::EndpointId{ 0 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + OnIdentifyTriggerEffect, }; Identify gIdentify1 = { @@ -85,6 +109,7 @@ Identify gIdentify1 = { [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + OnIdentifyTriggerEffect, }; #ifdef CONFIG_PLATFORM_8721D diff --git a/examples/build_overrides/mt793x_sdk.gni b/examples/build_overrides/mt793x_sdk.gni new file mode 100644 index 00000000000000..24c0c3e8464cde --- /dev/null +++ b/examples/build_overrides/mt793x_sdk.gni @@ -0,0 +1,18 @@ +# Copyright (c) 2022 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. + +declare_args() { + # Root directory for mt793x SDK build files. + mt793x_sdk_build_root = "//third_party/connectedhomeip/third_party/mt793x_sdk" +} diff --git a/examples/darwin-framework-tool/BUILD.gn b/examples/darwin-framework-tool/BUILD.gn index 513be497c1fb4f..7a9d459fe5f918 100644 --- a/examples/darwin-framework-tool/BUILD.gn +++ b/examples/darwin-framework-tool/BUILD.gn @@ -99,10 +99,10 @@ executable("darwin-framework-tool") { "commands/common/MTRError_Utils.h", "commands/common/MTRLogging.h", "commands/pairing/Commands.h", + "commands/pairing/DeviceControllerDelegateBridge.mm", "commands/pairing/OpenCommissioningWindowCommand.h", "commands/pairing/OpenCommissioningWindowCommand.mm", "commands/pairing/PairingCommandBridge.mm", - "commands/pairing/PairingDelegateBridge.mm", "commands/payload/SetupPayloadParseCommand.mm", "commands/provider/Commands.h", "commands/provider/OTAProviderDelegate.mm", diff --git a/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm b/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm index a21e6e201a2419..97b7c09806d200 100644 --- a/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm @@ -25,31 +25,15 @@ CHIP_ERROR ModelCommand::RunCommand() { - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip-tool.command", DISPATCH_QUEUE_SERIAL); - MTRDeviceController * commissioner = CurrentCommissioner(); ChipLogProgress(chipTool, "Sending command to node 0x" ChipLogFormatX64, ChipLogValueX64(mNodeId)); - [commissioner getBaseDevice:mNodeId - queue:callbackQueue - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - if (error != nil) { - SetCommandExitStatus(error, "Error getting connected device"); - return; - } - - CHIP_ERROR err; - if (device == nil) { - err = CHIP_ERROR_INTERNAL; - } else { - err = SendCommand(device, mEndPointId); - } + auto * device = [MTRBaseDevice deviceWithNodeID:@(mNodeId) controller:commissioner]; + CHIP_ERROR err = SendCommand(device, mEndPointId); - if (err != CHIP_NO_ERROR) { - ChipLogError(chipTool, "Error: %s", chip::ErrorStr(err)); - SetCommandExitStatus(err); - return; - } - }]; + if (err != CHIP_NO_ERROR) { + ChipLogError(chipTool, "Error: %s", chip::ErrorStr(err)); + return err; + } return CHIP_NO_ERROR; } diff --git a/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h index ab6165f474f1ec..cc5a3274540862 100644 --- a/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h @@ -54,24 +54,26 @@ class ReadAttribute : public ModelCommand { { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [device - readAttributeWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] - clusterID:[NSNumber numberWithUnsignedInteger:mClusterId] - attributeID:[NSNumber numberWithUnsignedInteger:mAttributeId] - params:params - queue:callbackQueue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - if (error != nil) { - LogNSError("Error reading attribute", error); - } - if (values) { - for (id item in values) { - NSLog(@"Response Item: %@", [item description]); - } - } - SetCommandExitStatus(error); - }]; + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [device readAttributePathWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] + clusterID:[NSNumber numberWithUnsignedInteger:mClusterId] + attributeID:[NSNumber numberWithUnsignedInteger:mAttributeId] + params:params + queue:callbackQueue + completion:^( + NSArray *> * _Nullable values, NSError * _Nullable error) { + if (error != nil) { + LogNSError("Error reading attribute", error); + } + if (values) { + for (id item in values) { + NSLog(@"Response Item: %@", [item description]); + } + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -124,16 +126,20 @@ class SubscribeAttribute : public ModelCommand { { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.autoResubscribe = mAutoResubscribe.HasValue() ? [NSNumber numberWithBool:mAutoResubscribe.Value()] : nil; - - [device subscribeAttributeWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.autoResubscribe = mAutoResubscribe.Value(); + } + + [device subscribeAttributePathWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] clusterID:[NSNumber numberWithUnsignedInteger:mClusterId] attributeID:[NSNumber numberWithUnsignedInteger:mAttributeId] - minInterval:[NSNumber numberWithUnsignedInteger:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInteger:mMaxInterval] params:params queue:callbackQueue reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { @@ -192,14 +198,15 @@ class SubscribeEvent : public ModelCommand { { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.autoResubscribe = mAutoResubscribe.HasValue() ? [NSNumber numberWithBool:mAutoResubscribe.Value()] : nil; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.autoResubscribe = mAutoResubscribe.Value(); + } [device subscribeWithQueue:callbackQueue - minInterval:@(mMinInterval) - maxInterval:@(mMaxInterval) params:params attributeCacheContainer:nil attributeReportHandler:^(NSArray * value) { diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm index 1ff4a427eeb61e..e886eed2c56b0c 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm @@ -111,15 +111,15 @@ mOTADelegate = [[OTAProviderDelegate alloc] init]; - auto factory = [MTRControllerFactory sharedInstance]; + auto factory = [MTRDeviceControllerFactory sharedInstance]; if (factory == nil) { ChipLogError(chipTool, "Controller factory is nil"); return CHIP_ERROR_INTERNAL; } - auto params = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + auto params = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; params.port = @(kListenPort); - params.startServer = YES; + params.shouldStartServer = YES; params.otaProviderDelegate = mOTADelegate; NSArray * paaCertResults; ReturnLogErrorOnFailure(GetPAACertsFromFolder(&paaCertResults)); @@ -127,9 +127,10 @@ params.paaCerts = paaCertResults; } - if ([factory startup:params] == NO) { + NSError * error; + if ([factory startControllerFactory:params error:&error] == NO) { ChipLogError(chipTool, "Controller factory startup failed"); - return CHIP_ERROR_INTERNAL; + return MTRErrorToCHIPErrorCode(error); } ReturnLogErrorOnFailure([gNocSigner createOrLoadKeys:storage]); @@ -138,21 +139,19 @@ constexpr const char * identities[] = { kIdentityAlpha, kIdentityBeta, kIdentityGamma }; for (size_t i = 0; i < ArraySize(identities); ++i) { - auto controllerParams = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:gNocSigner - fabricID:@(i + 1) - ipk:ipk]; + auto controllerParams = [[MTRDeviceControllerStartupParams alloc] initWithIPK:ipk fabricID:@(i + 1) nocSigner:gNocSigner]; // We're not sure whether we're creating a new fabric or using an // existing one, so just try both. - auto controller = [factory startControllerOnExistingFabric:controllerParams]; + auto controller = [factory createControllerOnExistingFabric:controllerParams error:&error]; if (controller == nil) { // Maybe we didn't have this fabric yet. controllerParams.vendorID = @(chip::VendorId::TestVendor1); - controller = [factory startControllerOnNewFabric:controllerParams]; + controller = [factory createControllerOnNewFabric:controllerParams error:&error]; } if (controller == nil) { ChipLogError(chipTool, "Controller startup failure."); - return CHIP_ERROR_INTERNAL; + return MTRErrorToCHIPErrorCode(error); } mControllers[identities[i]] = controller; @@ -195,16 +194,14 @@ { StopCommissioners(); - auto factory = [MTRControllerFactory sharedInstance]; + auto factory = [MTRDeviceControllerFactory sharedInstance]; NSData * ipk = [gNocSigner getIPK]; constexpr const char * identities[] = { kIdentityAlpha, kIdentityBeta, kIdentityGamma }; for (size_t i = 0; i < ArraySize(identities); ++i) { - auto controllerParams = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:gNocSigner - fabricID:@(i + 1) - ipk:ipk]; + auto controllerParams = [[MTRDeviceControllerStartupParams alloc] initWithIPK:ipk fabricID:@(i + 1) nocSigner:gNocSigner]; - auto controller = [factory startControllerOnExistingFabric:controllerParams]; + auto controller = [factory createControllerOnExistingFabric:controllerParams error:nil]; mControllers[identities[i]] = controller; } } @@ -216,7 +213,7 @@ mControllers.clear(); mCurrentController = nil; - [[MTRControllerFactory sharedInstance] shutdown]; + [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; } CHIP_ERROR CHIPCommandBridge::StartWaiting(chip::System::Clock::Timeout duration) diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.h b/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.h index c2f7ba220e9e50..d5f743d57673c5 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.h +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.h @@ -3,7 +3,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface CHIPToolPersistentStorageDelegate : NSObject +@interface CHIPToolPersistentStorageDelegate : NSObject - (nullable NSData *)storageDataForKey:(NSString *)key; - (BOOL)setStorageData:(NSData *)value forKey:(NSString *)key; - (BOOL)removeStorageDataForKey:(NSString *)key; diff --git a/examples/darwin-framework-tool/commands/pairing/Commands.h b/examples/darwin-framework-tool/commands/pairing/Commands.h index 164c952ffc2f4f..ffda27b9e3d348 100644 --- a/examples/darwin-framework-tool/commands/pairing/Commands.h +++ b/examples/darwin-framework-tool/commands/pairing/Commands.h @@ -41,12 +41,6 @@ class PairCodeThread : public PairingCommandBridge PairCodeThread() : PairingCommandBridge("code-thread", PairingMode::Code, PairingNetworkType::Thread) {} }; -class PairWithIPAddress : public PairingCommandBridge -{ -public: - PairWithIPAddress() : PairingCommandBridge("ethernet", PairingMode::Ethernet, PairingNetworkType::Ethernet) {} -}; - class PairBleWiFi : public PairingCommandBridge { public: @@ -70,10 +64,13 @@ void registerCommandsPairing(Commands & commands) const char * clusterName = "Pairing"; commands_list clusterCommands = { - make_unique(), make_unique(), - make_unique(), make_unique(), - make_unique(), make_unique(), - make_unique(), make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), }; commands.Register(clusterName, clusterCommands); diff --git a/examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.h b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h similarity index 92% rename from examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.h rename to examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h index e295e084725701..1c48daba882f0a 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.h +++ b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h @@ -20,7 +20,7 @@ #import -@interface CHIPToolPairingDelegate : NSObject +@interface CHIPToolDeviceControllerDelegate : NSObject @property PairingCommandBridge * commandBridge; @property chip::NodeId deviceID; @property MTRDeviceController * commissioner; diff --git a/examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.mm b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm similarity index 80% rename from examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.mm rename to examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm index b2dae799513433..2245c01f1aa2dc 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm @@ -16,29 +16,29 @@ * */ -#include "PairingDelegateBridge.h" +#include "DeviceControllerDelegateBridge.h" #import -@interface CHIPToolPairingDelegate () +@interface CHIPToolDeviceControllerDelegate () @end -@implementation CHIPToolPairingDelegate -- (void)onStatusUpdate:(MTRPairingStatus)status +@implementation CHIPToolDeviceControllerDelegate +- (void)onStatusUpdate:(MTRCommissioningStatus)status { NSLog(@"Pairing Status Update: %lu", status); switch (status) { - case MTRPairingStatusSuccess: + case MTRCommissioningStatusSuccess: ChipLogProgress(chipTool, "Secure Pairing Success"); ChipLogProgress(chipTool, "CASE establishment successful"); break; - case MTRPairingStatusFailed: + case MTRCommissioningStatusFailed: ChipLogError(chipTool, "Secure Pairing Failed"); _commandBridge->SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE); break; - case MTRPairingStatusDiscoveringMoreDevices: + case MTRCommissioningStatusDiscoveringMoreDevices: ChipLogProgress(chipTool, "Secure Pairing Discovering More Devices"); break; - case MTRPairingStatusUnknown: + case MTRCommissioningStatusUnknown: ChipLogError(chipTool, "Uknown Pairing Status"); break; } @@ -54,7 +54,7 @@ - (void)onPairingComplete:(NSError *)error ChipLogProgress(chipTool, "Pairing Success"); ChipLogProgress(chipTool, "PASE establishment successful"); NSError * commissionError; - [_commissioner commissionDevice:_deviceID commissioningParams:_params error:&commissionError]; + [_commissioner commissionNodeWithID:@(_deviceID) commissioningParams:_params error:&commissionError]; if (commissionError != nil) { _commandBridge->SetCommandExitStatus(commissionError); return; diff --git a/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm b/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm index ca8ef3c307dbfc..621010c1d16e8b 100644 --- a/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm +++ b/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm @@ -25,7 +25,7 @@ { mWorkQueue = dispatch_queue_create("com.chip.open_commissioning_window", DISPATCH_QUEUE_SERIAL); auto * controller = CurrentCommissioner(); - auto * device = [[MTRBaseDevice alloc] initWithNodeID:@(mNodeId) controller:controller]; + auto * device = [MTRBaseDevice deviceWithNodeID:@(mNodeId) controller:controller]; auto * self = this; if (mCommissioningWindowOption == 0) { diff --git a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h index cf736e0e193387..1b098adba25937 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h +++ b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h @@ -24,7 +24,6 @@ enum class PairingMode { None, Code, - Ethernet, Ble, }; @@ -64,12 +63,6 @@ class PairingCommandBridge : public CHIPCommandBridge case PairingMode::Code: AddArgument("payload", &mOnboardingPayload); break; - case PairingMode::Ethernet: - AddArgument("setup-pin-code", 0, 134217727, &mSetupPINCode); - AddArgument("discriminator", 0, 4096, &mDiscriminator); - AddArgument("device-remote-ip", &ipAddress); - AddArgument("device-remote-port", 0, UINT16_MAX, &mRemotePort); - break; case PairingMode::Ble: AddArgument("setup-pin-code", 0, 134217727, &mSetupPINCode); AddArgument("discriminator", 0, 4096, &mDiscriminator); @@ -84,9 +77,8 @@ class PairingCommandBridge : public CHIPCommandBridge private: void PairWithCode(NSError * __autoreleasing * error); void PairWithPayload(NSError * __autoreleasing * error); - void PairWithIPAddress(NSError * __autoreleasing * error); void Unpair(); - void SetUpPairingDelegate(); + void SetUpDeviceControllerDelegate(); const PairingMode mPairingMode; const PairingNetworkType mNetworkType; @@ -94,9 +86,7 @@ class PairingCommandBridge : public CHIPCommandBridge chip::ByteSpan mSSID; chip::ByteSpan mPassword; chip::NodeId mNodeId; - uint16_t mRemotePort; uint16_t mDiscriminator; uint32_t mSetupPINCode; char * mOnboardingPayload; - char * ipAddress; }; diff --git a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm index 8e04ac33926186..8bbda27ef8d420 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm @@ -19,8 +19,8 @@ #import #include "../common/CHIPCommandBridge.h" +#include "DeviceControllerDelegateBridge.h" #include "PairingCommandBridge.h" -#include "PairingDelegateBridge.h" #include #import "MTRError_Utils.h" @@ -28,14 +28,14 @@ using namespace ::chip; using namespace ::chip::Controller; -void PairingCommandBridge::SetUpPairingDelegate() +void PairingCommandBridge::SetUpDeviceControllerDelegate() { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.pairing", DISPATCH_QUEUE_SERIAL); - CHIPToolPairingDelegate * pairing = [[CHIPToolPairingDelegate alloc] init]; + CHIPToolDeviceControllerDelegate * deviceControllerDelegate = [[CHIPToolDeviceControllerDelegate alloc] init]; MTRCommissioningParameters * params = [[MTRCommissioningParameters alloc] init]; MTRDeviceController * commissioner = CurrentCommissioner(); - [pairing setDeviceID:mNodeId]; + [deviceControllerDelegate setDeviceID:mNodeId]; switch (mNetworkType) { case PairingNetworkType::None: case PairingNetworkType::Ethernet: @@ -49,11 +49,11 @@ break; } - [pairing setCommandBridge:this]; - [pairing setParams:params]; - [pairing setCommissioner:commissioner]; + [deviceControllerDelegate setCommandBridge:this]; + [deviceControllerDelegate setParams:params]; + [deviceControllerDelegate setCommissioner:commissioner]; - [commissioner setPairingDelegate:pairing queue:callbackQueue]; + [commissioner setDeviceControllerDelegate:deviceControllerDelegate queue:callbackQueue]; } CHIP_ERROR PairingCommandBridge::RunCommand() @@ -66,9 +66,6 @@ case PairingMode::Code: PairWithPayload(&error); break; - case PairingMode::Ethernet: - PairWithIPAddress(&error); - break; case PairingMode::Ble: PairWithCode(&error); break; @@ -82,76 +79,54 @@ void PairingCommandBridge::PairWithCode(NSError * __autoreleasing * error) { - SetUpPairingDelegate(); + SetUpDeviceControllerDelegate(); + auto * payload = [[MTRSetupPayload alloc] initWithSetupPasscode:@(mSetupPINCode) discriminator:@(mDiscriminator)]; MTRDeviceController * commissioner = CurrentCommissioner(); - [commissioner pairDevice:mNodeId discriminator:mDiscriminator setupPINCode:mSetupPINCode error:error]; + [commissioner setupCommissioningSessionWithPayload:payload newNodeID:@(mNodeId) error:error]; } void PairingCommandBridge::PairWithPayload(NSError * __autoreleasing * error) { - NSString * payload = [NSString stringWithUTF8String:mOnboardingPayload]; - - SetUpPairingDelegate(); - MTRDeviceController * commissioner = CurrentCommissioner(); - [commissioner pairDevice:mNodeId onboardingPayload:payload error:error]; -} - -void PairingCommandBridge::PairWithIPAddress(NSError * __autoreleasing * error) -{ - SetUpPairingDelegate(); + NSString * onboardingPayload = [NSString stringWithUTF8String:mOnboardingPayload]; + SetUpDeviceControllerDelegate(); + auto * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:onboardingPayload error:error]; + if (payload == nil) { + return; + } MTRDeviceController * commissioner = CurrentCommissioner(); - [commissioner pairDevice:mNodeId - address:[NSString stringWithUTF8String:ipAddress] - port:mRemotePort - setupPINCode:mSetupPINCode - error:error]; + [commissioner setupCommissioningSessionWithPayload:payload newNodeID:@(mNodeId) error:error]; } void PairingCommandBridge::Unpair() { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip-tool.command", DISPATCH_QUEUE_SERIAL); MTRDeviceController * commissioner = CurrentCommissioner(); - [commissioner - getBaseDevice:mNodeId - queue:callbackQueue - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - CHIP_ERROR err = CHIP_NO_ERROR; - if (error) { - err = MTRErrorToCHIPErrorCode(error); - LogNSError("Error: ", error); - SetCommandExitStatus(err); - } else if (device == nil) { - ChipLogError(chipTool, "Error: %s", chip::ErrorStr(CHIP_ERROR_INTERNAL)); - SetCommandExitStatus(CHIP_ERROR_INTERNAL); - } else { - ChipLogProgress(chipTool, "Attempting to unpair device %llu", mNodeId); - MTRBaseClusterOperationalCredentials * opCredsCluster = - [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(0) queue:callbackQueue]; - [opCredsCluster - readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable readError) { - if (readError) { - CHIP_ERROR readErr = MTRErrorToCHIPErrorCode(readError); - LogNSError("Failed to get current fabric: ", readError); - SetCommandExitStatus(readErr); - return; - } - MTROperationalCredentialsClusterRemoveFabricParams * params = - [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; - params.fabricIndex = value; - [opCredsCluster - removeFabricWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable removeError) { - CHIP_ERROR removeErr = CHIP_NO_ERROR; - if (removeError) { - removeErr = MTRErrorToCHIPErrorCode(removeError); - LogNSError("Failed to remove current fabric: ", removeError); - } else { - ChipLogProgress(chipTool, "Successfully unpaired deviceId %llu", mNodeId); - } - SetCommandExitStatus(removeErr); - }]; - }]; - } - }]; + auto * device = [MTRBaseDevice deviceWithNodeID:@(mNodeId) controller:commissioner]; + + ChipLogProgress(chipTool, "Attempting to unpair device %llu", mNodeId); + MTRBaseClusterOperationalCredentials * opCredsCluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(0) queue:callbackQueue]; + [opCredsCluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable readError) { + if (readError) { + CHIP_ERROR readErr = MTRErrorToCHIPErrorCode(readError); + LogNSError("Failed to get current fabric: ", readError); + SetCommandExitStatus(readErr); + return; + } + MTROperationalCredentialsClusterRemoveFabricParams * params = + [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + params.fabricIndex = value; + [opCredsCluster removeFabricWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable removeError) { + CHIP_ERROR removeErr = CHIP_NO_ERROR; + if (removeError) { + removeErr = MTRErrorToCHIPErrorCode(removeError); + LogNSError("Failed to remove current fabric: ", removeError); + } else { + ChipLogProgress(chipTool, "Successfully unpaired deviceId %llu", mNodeId); + } + SetCommandExitStatus(removeErr); + }]; + }]; } diff --git a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm index 1c8caa56089ca4..d73357e9323eef 100644 --- a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm +++ b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm @@ -39,7 +39,7 @@ } NSError * error; - return [MTROTAHeaderParser headerFromData:[NSData dataWithBytes:buffer.data() length:buffer.size()] error:&error]; + return [MTROTAHeader headerFromData:[NSData dataWithBytes:buffer.data() length:buffer.size()] error:&error]; } // Parses the JSON filepath and extracts DeviceSoftwareVersionModel parameters diff --git a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h index 6983787c56833f..8c4fe33d0ea87f 100644 --- a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h +++ b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h @@ -43,12 +43,12 @@ const char * getScriptsFolder() { return basePath; } constexpr const char * kDefaultKey = "default"; -@interface TestPairingDelegate : NSObject +@interface TestDeviceControllerDelegate : NSObject @property TestCommandBridge * commandBridge; @property chip::NodeId deviceId; @property BOOL active; // Whether to pass on notifications to the commandBridge -- (void)onStatusUpdate:(MTRPairingStatus)status; +- (void)onStatusUpdate:(MTRCommissioningStatus)status; - (void)onPairingComplete:(NSError * _Nullable)error; - (void)onPairingDeleted:(NSError * _Nullable)error; - (void)onCommissioningComplete:(NSError * _Nullable)error; @@ -70,7 +70,7 @@ class TestCommandBridge : public CHIPCommandBridge, public: TestCommandBridge(const char * _Nonnull commandName) : CHIPCommandBridge(commandName) - , mPairingDelegate([[TestPairingDelegate alloc] initWithTestCommandBridge:this]) + , mDeviceControllerDelegate([[TestDeviceControllerDelegate alloc] initWithTestCommandBridge:this]) { AddArgument("delayInMs", 0, UINT64_MAX, &mDelayInMs); AddArgument("PICS", &mPICSFilePath); @@ -156,9 +156,10 @@ class TestCommandBridge : public CHIPCommandBridge, SetIdentity(identity); - // Invalidate our existing CASE session; otherwise getConnectedDevice - // will just hand it right back to us without establishing a new CASE - // session when a reboot is done on the server. + // Invalidate our existing CASE session; otherwise trying to work with + // our device will just reuse it without establishing a new CASE + // session when a reboot is done on the server, and then our next + // interaction will time out. if (value.expireExistingSession.ValueOr(true)) { if (GetDevice(identity) != nil) { [GetDevice(identity) invalidateCASESession]; @@ -166,17 +167,10 @@ class TestCommandBridge : public CHIPCommandBridge, } } - [controller getBaseDevice:value.nodeId - queue:mCallbackQueue - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - if (error != nil) { - SetCommandExitStatus(error); - return; - } - - mConnectedDevices[identity] = device; - NextTest(); - }]; + mConnectedDevices[identity] = [MTRBaseDevice deviceWithNodeID:@(value.nodeId) controller:controller]; + dispatch_async(mCallbackQueue, ^{ + NextTest(); + }); return CHIP_NO_ERROR; } @@ -189,15 +183,19 @@ class TestCommandBridge : public CHIPCommandBridge, SetIdentity(identity); - [controller setPairingDelegate:mPairingDelegate queue:mCallbackQueue]; - [mPairingDelegate setDeviceId:value.nodeId]; - [mPairingDelegate setActive:YES]; + [controller setDeviceControllerDelegate:mDeviceControllerDelegate queue:mCallbackQueue]; + [mDeviceControllerDelegate setDeviceId:value.nodeId]; + [mDeviceControllerDelegate setActive:YES]; NSString * payloadStr = [[NSString alloc] initWithBytes:value.payload.data() length:value.payload.size() encoding:NSUTF8StringEncoding]; NSError * err; - BOOL ok = [controller pairDevice:value.nodeId onboardingPayload:payloadStr error:&err]; + auto * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:payloadStr error:&err]; + if (err != nil) { + return MTRErrorToCHIPErrorCode(err); + } + BOOL ok = [controller setupCommissioningSessionWithPayload:payload newNodeID:@(value.nodeId) error:&err]; if (ok == YES) { return CHIP_NO_ERROR; } @@ -234,7 +232,9 @@ class TestCommandBridge : public CHIPCommandBridge, VerifyOrReturn(commissioner != nil, Exit("No current commissioner")); NSError * commissionError = nil; - [commissioner commissionDevice:nodeId commissioningParams:[[MTRCommissioningParameters alloc] init] error:&commissionError]; + [commissioner commissionNodeWithID:@(nodeId) + commissioningParams:[[MTRCommissioningParameters alloc] init] + error:&commissionError]; CHIP_ERROR err = MTRErrorToCHIPErrorCode(commissionError); if (err != CHIP_NO_ERROR) { Exit("Failed to kick off commissioning", err); @@ -521,7 +521,7 @@ class TestCommandBridge : public CHIPCommandBridge, } private: - TestPairingDelegate * _Nonnull mPairingDelegate; + TestDeviceControllerDelegate * _Nonnull mDeviceControllerDelegate; // Set of our connected devices, keyed by identity. std::map mConnectedDevices; @@ -529,13 +529,13 @@ class TestCommandBridge : public CHIPCommandBridge, NS_ASSUME_NONNULL_BEGIN -@implementation TestPairingDelegate -- (void)onStatusUpdate:(MTRPairingStatus)status +@implementation TestDeviceControllerDelegate +- (void)onStatusUpdate:(MTRCommissioningStatus)status { if (_active) { - if (status == MTRPairingStatusSuccess) { + if (status == MTRCommissioningStatusSuccess) { NSLog(@"Secure pairing success"); - } else if (status == MTRPairingStatusFailed) { + } else if (status == MTRCommissioningStatusFailed) { _active = NO; NSLog(@"Secure pairing failed"); _commandBridge->OnStatusUpdate(chip::app::StatusIB(chip::Protocols::InteractionModel::Status::Failure)); diff --git a/examples/darwin-framework-tool/main.mm b/examples/darwin-framework-tool/main.mm index 09885d08eb3178..f0aeab45f78342 100644 --- a/examples/darwin-framework-tool/main.mm +++ b/examples/darwin-framework-tool/main.mm @@ -30,13 +30,15 @@ int main(int argc, const char * argv[]) { - Commands commands; - registerCommandsPairing(commands); - registerCommandsInteractive(commands); - registerCommandsPayload(commands); - registerClusterOtaSoftwareUpdateProviderInteractive(commands); - registerCommandsStorage(commands); - registerCommandsTests(commands); - registerClusters(commands); - return commands.Run(argc, (char **) argv); + @autoreleasepool { + Commands commands; + registerCommandsPairing(commands); + registerCommandsInteractive(commands); + registerCommandsPayload(commands); + registerClusterOtaSoftwareUpdateProviderInteractive(commands); + registerCommandsStorage(commands); + registerCommandsTests(commands); + registerClusters(commands); + return commands.Run(argc, (char **) argv); + } } diff --git a/examples/darwin-framework-tool/templates/commands.zapt b/examples/darwin-framework-tool/templates/commands.zapt index 494b8931c69a15..87a559bba4accb 100644 --- a/examples/darwin-framework-tool/templates/commands.zapt +++ b/examples/darwin-framework-tool/templates/commands.zapt @@ -114,7 +114,9 @@ public: MTRBaseCluster{{asUpperCamelCase parent.name}} * cluster = [[MTRBaseCluster{{asUpperCamelCase parent.name}} alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; {{#if_is_fabric_scoped_struct type}} MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } {{/if_is_fabric_scoped_struct}} [cluster readAttribute{{asUpperCamelCase name}}With {{~#if_is_fabric_scoped_struct type~}} @@ -216,12 +218,14 @@ public: ChipLogProgress(chipTool, "Sending cluster ({{asHex parent.code 8}}) ReportAttribute ({{asHex code 8}}) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseCluster{{asUpperCamelCase parent.name}} * cluster = [[MTRBaseCluster{{asUpperCamelCase parent.name}} alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribe{{>attribute}}WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribe{{>attribute}}WithParams:params subscriptionEstablished:^(){ mSubscriptionEstablished=YES; } reportHandler:^({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error) { NSLog(@"{{asUpperCamelCase parent.name}}.{{asUpperCamelCase name}} response %@", [value description]); diff --git a/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt b/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt index c13ecbdd0b19db..6670481e41d604 100644 --- a/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt +++ b/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt @@ -154,10 +154,8 @@ class {{filename}}: public TestCommandBridge {{#chip_tests_item_parameters}} {{asObjectiveCBasicType type}} {{asLowerCamelCase name}}Argument = {{asTypedLiteral definedValue type}}; {{/chip_tests_item_parameters}} - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - [cluster subscribeAttribute{{asUpperCamelCase attribute}}WithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] - maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) maxInterval:@(maxIntervalArgument)]; + [cluster subscribeAttribute{{asUpperCamelCase attribute}}WithParams:params subscriptionEstablished:^{ VerifyOrReturn(testSendCluster{{parent.filename}}_{{waitForReport.index}}_{{asUpperCamelCase waitForReport.command}}_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); NextTest(); @@ -168,7 +166,7 @@ class {{filename}}: public TestCommandBridge {{else if isReadAttribute}} {{#if_is_fabric_scoped_struct attributeObject.type}} MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:{{fabricFiltered}}]; + params.fabricFiltered = {{fabricFiltered}}; {{/if_is_fabric_scoped_struct}} [cluster readAttribute{{asUpperCamelCase attribute}}With {{~#if_is_fabric_scoped_struct attributeObject.type~}} diff --git a/examples/lighting-app/genio/.gn b/examples/lighting-app/genio/.gn new file mode 100644 index 00000000000000..0adefc6ff99c6a --- /dev/null +++ b/examples/lighting-app/genio/.gn @@ -0,0 +1,27 @@ +# 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") +} diff --git a/examples/lighting-app/genio/BUILD.gn b/examples/lighting-app/genio/BUILD.gn new file mode 100644 index 00000000000000..d77706624fd8f7 --- /dev/null +++ b/examples/lighting-app/genio/BUILD.gn @@ -0,0 +1,114 @@ +# Copyright (c) 2022 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") +import("//build_overrides/chip.gni") +import("//build_overrides/mt793x_sdk.gni") +import("//build_overrides/pigweed.gni") + +import("${build_root}/config/defaults.gni") +import("${mt793x_sdk_build_root}/mt793x_executable.gni") +import("${mt793x_sdk_build_root}/mt793x_sdk.gni") + +import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") +import("${chip_root}/src/platform/device.gni") + +if (chip_enable_pw_rpc) { + import("//build_overrides/pigweed.gni") + import("$dir_pw_build/target_types.gni") +} + +assert(current_os == "freertos") + +mt793x_project_dir = "${chip_root}/examples/lighting-app/genio" +mt793x_examples_plat_dir = "${chip_root}/examples/platform/mt793x" + +declare_args() { + # Dump memory usage at link time. + chip_print_memory_usage = true + + # PIN code for PASE session establishment. + setupPinCode = 20202021 + setupDiscriminator = 3840 +} + +mt793x_sdk("sdk") { + sources = [ "${mt793x_project_dir}/include/CHIPProjectConfig.h" ] + + include_dirs = [ + "${chip_root}/src/platform/mt793x", + "${mt793x_project_dir}/include", + "${mt793x_examples_plat_dir}", + "${chip_root}/src/lib", + ] + + defines = [ "OPENTHREAD_CONFIG_CLI_TRANSPORT=OT_CLI_TRANSPORT_CONSOLE" ] + + defines += [ + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}", + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}", + ] +} + +mt793x_executable("lighting_app") { + output_name = "chip-mt793x-lighting-app-example.out" + include_dirs = [ "include" ] + defines = [] + + sources = [ + "src/AppTask.cpp", + "src/LEDWidget.cpp", + "src/LightingManager.cpp", + "src/ZclCallbacks.cpp", + "src/main.cpp", + ] + + deps = [ + ":sdk", + "${chip_root}/examples/common/QRCode", + "${chip_root}/examples/lighting-app/lighting-common", + "${chip_root}/examples/providers:device_info_provider", + "${chip_root}/src/lib", + "${chip_root}/src/setup_payload", + "${mt793x_examples_plat_dir}:genio-matter-shell", + ] + + if (chip_enable_ota_requestor) { + defines += [ "MT793X_OTA_ENABLED" ] + sources += [ "${examples_plat_dir}/OTAConfig.cpp" ] + } + + ldscript = "mt793x_xip.ld" + + inputs = [ ldscript ] + + ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] + + if (chip_print_memory_usage) { + ldflags += [ + "-Wl,--print-memory-usage", + "-fstack-usage", + ] + } + + output_dir = root_out_dir +} + +group("mt793x") { + deps = [ ":lighting_app" ] +} + +group("default") { + deps = [ ":mt793x" ] +} diff --git a/examples/lighting-app/genio/README.md b/examples/lighting-app/genio/README.md new file mode 100644 index 00000000000000..18dfa286261309 --- /dev/null +++ b/examples/lighting-app/genio/README.md @@ -0,0 +1,112 @@ +#CHIP `Genio` Lighting Example + +An example showing the use of CHIP on the MediaTek `Genio` MT793X. + +
+ +- [CHIP Genio Lighting Example](#chip-genio-lighting-example) + - [Introduction](#introduction) + - [Building](#building) + - [Note](#note) + - [Flashing the Application](#flashing-the-application) + - [Viewing Logging Output](#viewing-logging-output) + - [Running the Complete Example](#running-the-complete-example) + - [Notes](#notes) + +
+ + + +## Introduction + +The `Genio` (MT793X) lighting example provides a baseline demonstration of a +Light control device, built using CHIP and the MediaTek `Genio` SDK. It can be +controlled by a Chip controller over Wi-Fi network. + +The `Genio` device can be commissioned over Bluetooth Low Energy where the +device and the Chip controller will exchange security information with the +Rendez-vous procedure. Network credentials are then provided to the `Genio` +device which will then join the network. + +The lighting example is intended to serve both as a means to explore the +workings of CHIP as well as a template for creating real products based on the +MediaTek platform. + + + +## Building + +- Following the Linux related descriptions in + [Build Matter](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/BUILDING.md) + to prepare the build environment. + +- Supported hardware: + + `Genio` 130A (MT7931) board: + + - `EK-AI7931LD KIT` + +* Build the example application: + + `cd ~/connectedhomeip` + `./scripts/examples/gn_genio_example.sh ./examples/lighting-app/genio` `./out/lighting-app` + +- To delete generated executable, libraries and object files use: + + `$ cd ~/connectedhomeip` + `$ rm -rf ./out/` + + OR use GN/Ninja directly + + `$ cd ~/connectedhomeip/examples/lighting-app/genio` + `$ git submodule update --init` + `$ source third_party/connectedhomeip/scripts/activate.sh` + `$ gn gen out/debug` + `$ ninja -C out/debug` + +- To delete generated executable, libraries and object files use: + + `$ cd ~/connectedhomeip/examples/lighting-app/genio` + `$ rm -rf out/` + +## Flashing the Application + +- Copy the GUI based + [Flash Tool](https://github.com/MediaTek-Labs/genio-matter-bsp/tree/main/flash_tool/FlashBurningTool_V2.83). + from the Linux Host that the example was build to a Windows PC. + + Flash Tool can be found in this source tree under this directory + + `third_party/mt793x_sdk/filogic/flash_tool` + +- On the Windows PC, run the Flash Tool + + 1. Select the scatter.ini file in the `./out/lighting-app` directory. + 2. Follow the instruction that comes with `EK-AI7931LD KIT` to switch the + kit to download mode. + 3. Click `Download` on FLASH TOOL. + +## Running the Complete Example + +- You can provision and control the Chip device using the python controller, + Chip tool standalone, Android or iOS app + + [CHIP + Tool]](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/chip_tool_guide.md) + + Here is an example with the CHIP Tool controller: + + ``` + chiptool- pairing ble-wifi 1234 my-ap myappassword 20202021 3840 + + chiptool onoff on 1 1 + + chiptool onoff off 1 1 + ``` + +### Notes + +- Depending on your network settings your router might not provide native ipv6 + addresses to your devices (Border router / PC). If this is the case, you + need to add a static ipv6 addresses on both device and then an ipv6 route to + the border router on your PC diff --git a/examples/lighting-app/genio/args.gni b/examples/lighting-app/genio/args.gni new file mode 100644 index 00000000000000..ddbfb9fa47f20d --- /dev/null +++ b/examples/lighting-app/genio/args.gni @@ -0,0 +1,34 @@ +# Copyright (c) 2022 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/pigweed.gni") +import("${chip_root}/src/platform/mt793x/args.gni") + +mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" +pw_assert_BACKEND = "$dir_pw_assert_log" + +chip_enable_ble = true + +declare_args() { + chip_enable_ota_requestor = false + + # Disable lock tracking, since our FreeRTOS configuration does not set + # INCLUDE_xSemaphoreGetMutexHolder + chip_stack_lock_tracking = "none" + + chip_config_network_layer_ble = true +} diff --git a/examples/lighting-app/genio/build_for_wifi_args.gni b/examples/lighting-app/genio/build_for_wifi_args.gni new file mode 100644 index 00000000000000..cb0ea7600a2dd5 --- /dev/null +++ b/examples/lighting-app/genio/build_for_wifi_args.gni @@ -0,0 +1,22 @@ +# 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("//build_overrides/pigweed.gni") + +mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") +chip_enable_openthread = false +import("${chip_root}/src/platform/MT793X/wifi_args.gni") + +pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" +pw_assert_BACKEND = "$dir_pw_assert_log" diff --git a/examples/lighting-app/genio/build_for_wifi_gnfile.gn b/examples/lighting-app/genio/build_for_wifi_gnfile.gn new file mode 100644 index 00000000000000..9752ee73e7c91d --- /dev/null +++ b/examples/lighting-app/genio/build_for_wifi_gnfile.gn @@ -0,0 +1,28 @@ +# 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" + use_thread = false + import("//build_for_wifi_args.gni") +} diff --git a/examples/lighting-app/genio/build_overrides b/examples/lighting-app/genio/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/lighting-app/genio/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/lighting-app/genio/include/AppConfig.h b/examples/lighting-app/genio/include/AppConfig.h new file mode 100644 index 00000000000000..87400b0681c253 --- /dev/null +++ b/examples/lighting-app/genio/include/AppConfig.h @@ -0,0 +1,46 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 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. + */ + +#pragma once + +// ---- Lighting Example App Config ---- + +#define APP_TASK_NAME "Lit" + +// Time it takes in ms for the simulated actuator to move from one +// state to another. +#define ACTUATOR_MOVEMENT_PERIOS_MS 10 + +// Genio Logging +#ifdef __cplusplus +extern "C" { +#endif + +void mt793xLogInit(void); + +void mt793xLog(const char * aFormat, ...); +#define MT793X_LOG(aFormat...) mt793xLog(aFormat); +void appError(int err); + +#ifdef __cplusplus +} + +#include +void appError(CHIP_ERROR error); +#endif diff --git a/examples/lighting-app/genio/include/AppEvent.h b/examples/lighting-app/genio/include/AppEvent.h new file mode 100644 index 00000000000000..2483fe3cf9f831 --- /dev/null +++ b/examples/lighting-app/genio/include/AppEvent.h @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2018 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 + +struct AppEvent; +typedef void (*EventHandler)(AppEvent *); + +struct AppEvent +{ + enum AppEventTypes + { + kEventType_Button = 0, + kEventType_Timer, + kEventType_Light, + kEventType_Install, + }; + + uint16_t Type; + + union + { + struct + { + bool Pressed; + } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + struct + { + uint8_t Action; + int32_t Actor; + } LightEvent; + }; + + EventHandler Handler; +}; diff --git a/examples/lighting-app/genio/include/AppTask.h b/examples/lighting-app/genio/include/AppTask.h new file mode 100644 index 00000000000000..77d21715196189 --- /dev/null +++ b/examples/lighting-app/genio/include/AppTask.h @@ -0,0 +1,92 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 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. + */ + +#pragma once + +#include +#include + +#include "AppEvent.h" +#include "LightingManager.h" +#include "filogic_button.h" + +#include "FreeRTOS.h" +#include "timers.h" // provides FreeRTOS timer support +#include + +// Application-defined error codes in the CHIP_ERROR space. +#define APP_ERROR_EVENT_QUEUE_FAILED CHIP_APPLICATION_ERROR(0x01) +#define APP_ERROR_CREATE_TASK_FAILED CHIP_APPLICATION_ERROR(0x02) +#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03) +#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04) +#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05) +#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06) + +class AppTask +{ + +public: + CHIP_ERROR StartAppTask(); + static void AppTaskMain(void * pvParameter); + + void PostLightActionRequest(int32_t aActor, LightingManager::Action_t aAction); + void PostEvent(const AppEvent * event); + + void ButtonHandler(const filogic_button_t & button); + +private: + friend AppTask & GetAppTask(void); + + CHIP_ERROR Init(); + + static void ActionInitiated(LightingManager::Action_t aAction, int32_t aActor); + static void ActionCompleted(LightingManager::Action_t aAction); + + void DispatchEvent(AppEvent * event); + + static void SingleButtonEventHandler(AppEvent * aEvent); + static void ButtonTimerEventHandler(AppEvent * aEvent); + + static void LightActionEventHandler(AppEvent * aEvent); + + static void TimerEventHandler(TimerHandle_t xTimer); + void StartTimer(uint32_t aTimeoutMs); + void CancelTimer(void); + + enum Function_t + { + kFunction_NoneSelected = 0, + kFunction_StartBleAdv = 1, + kFunction_LightSwitch = 2, + kFunction_FactoryReset = 3, + kFunction_SoftwareUpdate = 0, + + kFunction_Invalid + } Function; + + Function_t mFunction; + bool mFunctionTimerActive; + + static AppTask sAppTask; +}; + +inline AppTask & GetAppTask(void) +{ + return AppTask::sAppTask; +} diff --git a/examples/lighting-app/genio/include/CHIPProjectConfig.h b/examples/lighting-app/genio/include/CHIPProjectConfig.h new file mode 100644 index 00000000000000..f5f52250532463 --- /dev/null +++ b/examples/lighting-app/genio/include/CHIPProjectConfig.h @@ -0,0 +1,133 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 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 a default pairing 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 + +// For convenience, Chip Security Test Mode can be enabled and the +// requirement for authentication in various protocols can be disabled. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 +#define CHIP_CONFIG_REQUIRE_AUTH 1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0x1373: MediaTek's Vendor Id. + * 0xFFF1: Common Test Vendor Id. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + * 0x1000: Genio lighting-app + * 0x8005: Common test lighting-app + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 + +/** + * 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 1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP service 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 "0.1ALPHA" +#endif +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + * + * Enable support for Chip-over-BLE (CHIPoBLE). + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote Chip Time service + * using the Chip Time Sync protocol. + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 + +/** + * 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" + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +/** + * @def CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL + * + * @brief + * Active retransmit interval, or time to wait before retransmission after + * subsequent failures in milliseconds. + * + * This is the default value, that might be adjusted by end device depending on its + * needs (e.g. sleeping period) using Service Discovery TXT record CRA key. + * + */ +#define CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL (2000_ms32) diff --git a/examples/lighting-app/genio/include/LEDWidget.h b/examples/lighting-app/genio/include/LEDWidget.h new file mode 100644 index 00000000000000..35b0f52379e90c --- /dev/null +++ b/examples/lighting-app/genio/include/LEDWidget.h @@ -0,0 +1,68 @@ +/* + * + * 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. + */ + +#pragma once + +#include +#include + +#include + +enum led_id +{ + LED_LIGHT, + LED_STATUS +}; + +enum led_color +{ + LED_RED, + LED_GREEN, + LED_BLUE +}; + +class LEDWidget +{ +public: + // bind this LEDWidget with the specified LED + void Init(enum led_id led); + // retrieve the name of this LED + const char * Name(void); + // set to ON or OFF, no blink + void Set(bool state); + // change the color + void Color(enum led_color color); + // specify the ON, OFF duration + void Blink(int on, int off); + // specify evenly ON and OFF both to 'duration' + void Blink(int duration); + +private: + enum led_id mLed; + enum led_color mColor; + int mOn; + int mOff; + bool mState; + void Toggle(void); + void DoSet(bool state); + + TimerHandle_t mTimer; + static void TimerHandler(TimerHandle_t xTimer); + void DoBlink(void); + void StartTimer(uint32_t aTimeoutInMs); + void CancelTimer(void); +}; diff --git a/examples/lighting-app/genio/include/LightingManager.h b/examples/lighting-app/genio/include/LightingManager.h new file mode 100644 index 00000000000000..3aa9871e919074 --- /dev/null +++ b/examples/lighting-app/genio/include/LightingManager.h @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2019 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. + */ + +#pragma once + +#include +#include + +#include "AppEvent.h" + +#include "FreeRTOS.h" +#include "timers.h" // provides FreeRTOS timer support + +#include + +class LightingManager +{ +public: + enum Action_t + { + ON_ACTION = 0, + OFF_ACTION, + + INVALID_ACTION + } Action; + + enum State_t + { + kState_OffInitiated = 0, + kState_OffCompleted, + kState_OnInitiated, + kState_OnCompleted, + } State; + + CHIP_ERROR Init(); + bool IsLightOn(); + void EnableAutoTurnOff(bool aOn); + void SetAutoTurnOffDuration(uint32_t aDurationInSecs); + bool IsActionInProgress(); + bool InitiateAction(int32_t aActor, Action_t aAction); + + typedef void (*Callback_fn_initiated)(Action_t, int32_t aActor); + typedef void (*Callback_fn_completed)(Action_t); + void SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB); + +private: + friend LightingManager & LightMgr(void); + State_t mState; + + Callback_fn_initiated mActionInitiated_CB; + Callback_fn_completed mActionCompleted_CB; + + bool mAutoTurnOff; + uint32_t mAutoTurnOffDuration; + bool mAutoTurnOffTimerArmed; + + void CancelTimer(void); + void StartTimer(uint32_t aTimeoutMs); + + static void TimerEventHandler(TimerHandle_t xTimer); + static void AutoTurnOffTimerEventHandler(AppEvent * aEvent); + static void ActuatorMovementTimerEventHandler(AppEvent * aEvent); + + static LightingManager sLight; +}; + +inline LightingManager & LightMgr(void) +{ + return LightingManager::sLight; +} diff --git a/examples/lighting-app/genio/mt793x_xip.ld b/examples/lighting-app/genio/mt793x_xip.ld new file mode 100755 index 00000000000000..fd577c07ca60a0 --- /dev/null +++ b/examples/lighting-app/genio/mt793x_xip.ld @@ -0,0 +1,394 @@ +/* + * MT7933 CM33 Memory Map + */ + +HIDDEN(__STACK_SIZE = 0x1000); +HIDDEN(__SYSRAM_OFFSET = 0x0); + +OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") +OUTPUT_ARCH(arm) + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Memory Spaces Definitions: 16MB flash */ +MEMORY +{ + ROM_BL(rx) : ORIGIN = 0x18000000, LENGTH = 64K + ROM_RBL(rx) : ORIGIN = 0x18010000, LENGTH = 8K + ROM_TFM(rx) : ORIGIN = 0x18012000, LENGTH = 200K + ROM_RTOS(rx) : ORIGIN = 0x18044000, LENGTH = 2092K + /* + Reserved : LENGTH = 228 K, 152 K For TFM + Free For Customer : LENGTH = 500 K + */ + ROM_FOTA(r) : ORIGIN = 0x18305000, LENGTH = 3968K + ROM_NVDM(rx) : ORIGIN = 0x186E5000, LENGTH = 64K + ROM_LOG(rx) : ORIGIN = 0x186F5000, LENGTH = 64K + ROM_BT(rx) : ORIGIN = 0x18705000, LENGTH = 304K + /* + Reserved For FW : LENGTH = 40 K + */ + ROM_WIFI_PWRTBL(rx): ORIGIN = 0x1875B000, LENGTH = 20K + ROM_WIFI_EXT(rx) : ORIGIN = 0x18760000, LENGTH = 636K + ROM_BUFFER_BIN(rx): ORIGIN = 0x187FF000, LENGTH = 4K + + TCM(rwx) : ORIGIN = 0x0010C000, LENGTH = 20K + RAM_WFFW(rwx) : ORIGIN = 0xA0000000, LENGTH = 312K + RAM(rwx) : ORIGIN = 0xA004E000, LENGTH = 3272K + RAM_TFM(rwx) : ORIGIN = 0xA0380000, LENGTH = 512K + RAM_BTFW(rwx) : ORIGIN = 0xA0400000, LENGTH = 352K + SYSRAM(rwx) : ORIGIN = 0x80000000, LENGTH = 992K + /* + Reserved : LENGTH = 32K + */ + + VROM(rx) : ORIGIN = 0x18000000, LENGTH = 4096K + VRAM_WFFW(rwx) : ORIGIN = 0x10000000, LENGTH = 312K + VRAM(rwx) : ORIGIN = 0x1004E000, LENGTH = 3272K + VRAM_TFM(rwx) : ORIGIN = 0x10380000, LENGTH = 512K + VRAM_BTFW(rwx) : ORIGIN = 0x10400000, LENGTH = 352K + VSYSRAM(rwx) : ORIGIN = 0x08000000, LENGTH = 992K + /* + Reserved : LENGTH = 32K + */ +} + +/**************************************************************************** + * + * FORWARD DECLARATIONS - SECTION SYMBOLS @ FLASH PHYSICAL ADDRESS + * + ****************************************************************************/ + + +_rom_bl_start = ORIGIN(ROM_BL) - ORIGIN(ROM_BL); +_rom_bl_length = LENGTH(ROM_BL); +_rom_rbl_start = ORIGIN(ROM_RBL) - ORIGIN(ROM_BL); +_rom_rbl_length = LENGTH(ROM_RBL); +_rom_tfm_start = ORIGIN(ROM_TFM) - ORIGIN(ROM_BL); +_rom_tfm_length = LENGTH(ROM_TFM); +_rom_rtos_start = ORIGIN(ROM_RTOS) - ORIGIN(ROM_BL); +_rom_rtos_length = LENGTH(ROM_RTOS); +_rom_fota_start = ORIGIN(ROM_FOTA) - ORIGIN(ROM_BL); +_rom_fota_length = LENGTH(ROM_FOTA); +_rom_wifi_patch_start = 0;/*ORIGIN(ROM_WIFI_PATCH) - ORIGIN(ROM_BL);*/ +_rom_wifi_patch_length = 0;/*LENGTH(ROM_WIFI_PATCH);*/ +_rom_wifi_start = 0;/*ORIGIN(ROM_WIFI) - ORIGIN(ROM_BL);*/ +_rom_wifi_length = 0;/*LENGTH(ROM_WIFI);*/ +_rom_wifi_ext_start = ORIGIN(ROM_WIFI_EXT) - ORIGIN(ROM_BL); +_rom_wifi_ext_length = LENGTH(ROM_WIFI_EXT); +_rom_wifi_pwrtbl_start = ORIGIN(ROM_WIFI_PWRTBL) - ORIGIN(ROM_BL); +_rom_wifi_pwrtbl_length = LENGTH(ROM_WIFI_PWRTBL); +_rom_buffer_bin_start = ORIGIN(ROM_BUFFER_BIN) - ORIGIN(ROM_BL); +_rom_buffer_bin_length = LENGTH(ROM_BUFFER_BIN); +_rom_bt_start = ORIGIN(ROM_BT) - ORIGIN(ROM_BL); +_rom_bt_length = LENGTH(ROM_BT); +_rom_nvdm_start = ORIGIN(ROM_NVDM) - ORIGIN(ROM_BL); +_rom_nvdm_length = LENGTH(ROM_NVDM); +_rom_log_start = ORIGIN(ROM_LOG) - ORIGIN(ROM_BL); +_rom_log_length = LENGTH(ROM_LOG); + + +/**************************************************************************** + * + * FORWARD DECLARATIONS - SECTION SYMBOLS @ MEMORY BUS ADDRESS + * + ****************************************************************************/ + +_xip_bl_addr = ORIGIN(ROM_BL); +_xip_rbl_addr = ORIGIN(ROM_RBL); +_xip_tfm_addr = ORIGIN(ROM_TFM); +_xip_rtos_addr = ORIGIN(ROM_RTOS); +_xip_nvdm_start = ORIGIN(ROM_NVDM); +_xip_log_start = ORIGIN(ROM_LOG); +_xip_bt_start = ORIGIN(ROM_BT); + +_sysram_start = ORIGIN(SYSRAM); +_sysram_length = LENGTH(SYSRAM); +_ram_start = ORIGIN(RAM); +_ram_length = LENGTH(RAM); +_ram_wifi_ext_start = ORIGIN(RAM_WFFW); +_ram_wifi_ext_length = LENGTH(RAM_WFFW); +_vram_start = ORIGIN(VRAM); +_vram_length = LENGTH(VRAM); +_vsysram_start = ORIGIN(VSYSRAM); +_vsysram_length = LENGTH(VSYSRAM); +_tcm_start = ORIGIN(TCM); +_tcm_length = LENGTH(TCM); + + /* Highest address of the stack */ +_stack_end = ORIGIN(TCM) + LENGTH(TCM); /* end of TCM */ + +/* stack start */ +_stack_start = _stack_end - __STACK_SIZE; + +/* SYSRAM Region0 Offset for BROM */ +_region0_offset = 0x13000 ; + +SECTIONS +{ + . = ORIGIN(ROM_RTOS); + .text ALIGN(4): + { + _text_start = .; + KEEP(*(.vectorsTop)) + KEEP(*(.vectors)) + /* *(.text*) */ + *(EXCLUDE_FILE(*/iperf_task.o *sockets*.o *netbuf*.o *pbuf*.o */mem.o *api_lib*.o */def.o *api_msg*.o *sys_arch*.o *ip4*.o *ip4_addr*.o *udp*.o *inet_chksum*.o *tcp_out*.o *tcp*.o */netif.o */ethernet.o *etharp*.o */lwip_cli.o *portasm*.o *event_groups*.o */heap_ext.o */queue.o */tasks.o *list*.o *os_port_callback*.o */port.o *timers*.o *hal_nvic*.o *libc_nano*.a:*memset*.o *libc_nano*.a:*memcpy*.o *libminisupp.a:*mem*.o) .text*) + KEEP(*(.init)) + KEEP(*(.fini)) + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + *(.rodata*) + *(.rom_rtos) + KEEP(*(.eh_frame*)) + . = ALIGN(4); + _text_end = .; + } > ROM_RTOS AT> ROM_RTOS + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > ROM_RTOS AT> ROM_RTOS + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > ROM_RTOS AT> ROM_RTOS + __exidx_end = .; + + . = ALIGN(32); + _sysram_code_load = LOADADDR(.sysram_text); + .sysram_text ORIGIN(VSYSRAM)+_region0_offset : + { + _sysram_code_start = .; + *(.sysram_code) + *(.text*) + *(.sysram_rodata) + . = ALIGN(4); + _sysram_code_end = .; + } > VSYSRAM AT> ROM_RTOS + + . = ALIGN(4); + _sysram_data_load = LOADADDR(.cached_sysram_data); + .cached_sysram_data : + { + _sysram_data_start = .; + *(vtable) + *(.data) + *(.data.*) + *(.sysram_rwdata) + . = ALIGN(4); + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + . = ALIGN(4); + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + KEEP(*(.jcr*)) + . = ALIGN(4); + _sysram_data_end = .; + } > VSYSRAM AT> ROM_RTOS + + . = ALIGN(4); + .bss (NOLOAD) : + { + _sysram_bss_start = .; + *(.bss) + *(.bss.*) + *(COMMON) + *(.sysram_zidata) + *(.sysram_swla_zidata) + . = ALIGN(4); + _sysram_bss_end = .; + } > VSYSRAM AT> ROM_RTOS + + + . = ALIGN(32); + _noncached_sysram_code_load = LOADADDR(.noncached_sysram_text); + . = . + ORIGIN(SYSRAM) - ORIGIN(VSYSRAM); + .noncached_sysram_text . : + { + _noncached_sysram_code_start = .; + *(.noncached_sysram_code) + *(.noncached_sysram_rodata) + . = ALIGN(4); + _noncached_sysram_code_end = .; + } > SYSRAM AT> ROM_RTOS + + . = ALIGN(4); + _noncached_sysram_data_load = LOADADDR(.noncached_sysram_data); + .noncached_sysram_data . : + { + _noncached_sysram_data_start = .; + *(.noncached_sysram_rwdata) + *(.secure_settings_section) + . = ALIGN(4); + _noncached_sysram_data_end = .; + } > SYSRAM AT> ROM_RTOS + + . = ALIGN(4); + .noncached_sysram_bss . (NOLOAD) : + { + _noncached_sysram_bss_start = .; + *(.noncached_sysram_zidata) + . = ALIGN(4); + _noncached_sysram_bss_end = .; + } > SYSRAM AT> ROM_RTOS + + . = ALIGN(32); + .btfw_code (NOLOAD) : + { + *(.bt_firmware_emi_code) + . = ALIGN(4); + } > RAM_BTFW AT> ROM_RTOS + + . = ALIGN(32); + .wffw_code (NOLOAD) : + { + *(.wf_firmware_emi_code) + . = ALIGN(4); + } > RAM_WFFW AT> ROM_RTOS + + . = ALIGN(32); + _ram_code_load = LOADADDR(.cached_ram_text); + .cached_ram_text : + { + _ram_code_start = .; + *(.ram_code) + *(.ram_rodata) + . = ALIGN(4); + _ram_code_end = .; + } > VRAM AT> ROM_RTOS + + . = ALIGN(4); + _ram_data_load = LOADADDR(.cached_ram_data); + .cached_ram_data : + { + _ram_data_start = .; + *(.ram_rwdata) + . = ALIGN(4); + _ram_data_end = .; + } > VRAM AT> ROM_RTOS + + . = ALIGN(4); + _ram_bss_load = LOADADDR(.cached_ram_bss); + .cached_ram_bss (NOLOAD) : + { + _ram_bss_start = .; + *(.ram_zidata) + . = ALIGN(4); + _ram_bss_end = .; + } > VRAM AT> ROM_RTOS + + . = ALIGN(32); + _noncached_ram_code_load = LOADADDR(.noncached_ram_text); + . = . + ORIGIN(RAM) - ORIGIN(VRAM); + .noncached_ram_text . : + { + _noncached_ram_code_start = .; + *(.noncached_ram_code) + *(.noncached_ram_rodata) + . = ALIGN(4); + _noncached_ram_code_end = .; + } > RAM AT> ROM_RTOS + + . = ALIGN(4); + _noncached_ram_data_load = LOADADDR(.noncached_ram_data); + .noncached_ram_data . : + { + _noncached_ram_data_start = .; + *(.noncached_ram_rwdata) + . = ALIGN(4); + _noncached_ram_data_end = .; + } > RAM AT> ROM_RTOS + + . = ALIGN(4); + _noncached_ram_bss_load = LOADADDR(.noncached_ram_bss); + .noncached_ram_bss . (NOLOAD) : + { + _noncached_ram_bss_start = .; + *(.noncached_ram_zidata) + . = ALIGN(4); + _noncached_ram_bss_end = .; + } > RAM AT> ROM_RTOS + + + . = ALIGN(4); + _tcm_code_load = LOADADDR(.tcm_text); + .tcm_text : + { + _tcm_code_start = .; + *(.tcm_code) + *(.tcm_rodata) + . = ALIGN(4); + _tcm_code_end = .; + }> TCM AT> ROM_RTOS + + . = ALIGN(4); + _tcm_data_load = LOADADDR(.tcm_data); + .tcm_data : + { + _tcm_data_start = .; + . = ALIGN(4); + *(.tcm_rwdata) + . = ALIGN(4); + _tcm_data_end = .; + }> TCM AT> ROM_RTOS + + . = ALIGN(4); + .tcm_bss (NOLOAD) : + { + _tcm_bss_start = .; + *(.tcm_zidata) + . = ALIGN(4); + *(.tcm_wakeup_info) + . = ALIGN(4); + _tcm_bss_end = .; + }> TCM AT> ROM_RTOS + + + __end__ = .; + + .mcuboot_tlv_rsvd (NOLOAD) : + { + /* reserve 512 bytes for imgtool.py TLVs */ + . = . + 512 ; + } > ROM_RTOS AT> ROM_RTOS + + .stack (ORIGIN(TCM) + LENGTH(TCM) - __STACK_SIZE) (COPY) : + { + . = ALIGN(4); + __StackLimit = .; + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + __STACK_SIZE; + . = ALIGN(4); + __StackTop = .; + } > TCM + + PROVIDE(__stack = __StackTop); + + ASSERT(__StackLimit >= __end__, "region TCM overflowed with stack") +} + + + diff --git a/examples/lighting-app/genio/src/AppTask.cpp b/examples/lighting-app/genio/src/AppTask.cpp new file mode 100644 index 00000000000000..99b6bfb435c1ee --- /dev/null +++ b/examples/lighting-app/genio/src/AppTask.cpp @@ -0,0 +1,488 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 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. + */ + +#include "AppTask.h" +#include "AppConfig.h" +#include "AppEvent.h" +#include "LEDWidget.h" + +#include "qrcodegen.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include + +#include + +#include +#include + +#define FACTORY_RESET_TRIGGER_TIMEOUT 3000 +#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 +#define APP_TASK_STACK_SIZE (4096) +#define APP_TASK_PRIORITY 2 +#define APP_EVENT_QUEUE_SIZE 10 +#define EXAMPLE_VENDOR_ID 0xcafe + +#ifdef portYIELD_FROM_ISR +#define OS_YIELD_FROM_ISR(yield) portYIELD_FROM_ISR(yield) +#elif portEND_SWITCHING_ISR +#define OS_YIELD_FROM_ISR(yield) portEND_SWITCHING_ISR(yield) +#else +#error "Must have portYIELD_FROM_ISR or portEND_SWITCHING_ISR" +#endif + +#define UNUSED_PARAMETER(a) (a = a) + +namespace { + +TimerHandle_t sFunctionTimer; // FreeRTOS app sw timer. +TaskHandle_t sAppTaskHandle; +QueueHandle_t sAppEventQueue; + +LEDWidget sStatusLED; +LEDWidget sLightLED; + +bool sIsWiFiProvisioned = false; +bool sIsWiFiEnabled = false; +bool sIsWiFiAttached = false; + +uint8_t sAppEventQueueBuffer[APP_EVENT_QUEUE_SIZE * sizeof(AppEvent)]; +StaticQueue_t sAppEventQueueStruct; + +StackType_t appStack[APP_TASK_STACK_SIZE * 2 / sizeof(StackType_t)]; +StaticTask_t appTaskStruct; + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +using namespace chip::DeviceLayer::NetworkCommissioning; +chip::app::Clusters::NetworkCommissioning::Instance sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, + &GenioWiFiDriver::GetInstance()); +#endif + +} // namespace + +using namespace chip::TLV; +using namespace ::chip::Credentials; +using namespace ::chip::DeviceLayer; + +AppTask AppTask::sAppTask; + +CHIP_ERROR AppTask::StartAppTask() +{ + sAppEventQueue = xQueueCreateStatic(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent), sAppEventQueueBuffer, &sAppEventQueueStruct); + if (sAppEventQueue == NULL) + { + MT793X_LOG("Failed to allocate app event queue"); + appError(APP_ERROR_EVENT_QUEUE_FAILED); + } + + // Start App task. + sAppTaskHandle = xTaskCreateStatic(AppTaskMain, APP_TASK_NAME, ArraySize(appStack), NULL, 1, appStack, &appTaskStruct); + if (sAppTaskHandle == nullptr) + return APP_ERROR_CREATE_TASK_FAILED; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR error = CHIP_NO_ERROR; + + // Wait for the WiFi to be initialized + MT793X_LOG("APP: Wait WiFi Init"); + vTaskDelay(1000); // TODO + MT793X_LOG("APP: Done WiFi Init"); + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + sWiFiNetworkCommissioningInstance.Init(); +#endif + + // Init ZCL Data Model and start server + static chip::CommonCaseDeviceServerInitParams initParams; + (void) initParams.InitializeStaticResourcesBeforeServerInit(); + chip::Server::GetInstance().Init(initParams); + + // Initialize device attestation config + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + + // Create FreeRTOS sw timer for Function Selection. + sFunctionTimer = xTimerCreate("FnTmr", // Just a text name, not used by the RTOS kernel + 1, // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = app task obj context + TimerEventHandler // timer callback handler + ); + if (sFunctionTimer == NULL) + { + MT793X_LOG("funct timer create failed"); + appError(APP_ERROR_CREATE_TIMER_FAILED); + } + + MT793X_LOG("Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + error = LightMgr().Init(); + if (error != CHIP_NO_ERROR) + { + MT793X_LOG("LightMgr Init failed"); + appError(error); + } + + LightMgr().SetCallbacks(ActionInitiated, ActionCompleted); + + sStatusLED.Init(LED_STATUS); + sLightLED.Init(LED_LIGHT); + sLightLED.Set(LightMgr().IsLightOn()); + + ConfigurationMgr().LogDeviceConfig(); + + // PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kBLE)); + PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kSoftAP)); + + return error; +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + AppEvent event; + + CHIP_ERROR error = sAppTask.Init(); + if (error != CHIP_NO_ERROR) + { + MT793X_LOG("AppTask.Init() failed"); + appError(error); + } + + MT793X_LOG("AppTask started"); + + while (true) + { + BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, pdMS_TO_TICKS(10)); + while (eventReceived == pdTRUE) + { + sAppTask.DispatchEvent(&event); + eventReceived = xQueueReceive(sAppEventQueue, &event, 0); + } + + // Collect connectivity and configuration state from the CHIP stack. Because + // the CHIP event loop is being run in a separate task, the stack must be + // locked while these values are queried. However we use a non-blocking + // lock request (TryLockCHIPStack()) to avoid blocking other UI activities + // when the CHIP task is busy (e.g. with a long crypto operation). + if (PlatformMgr().TryLockChipStack()) + { + sIsWiFiProvisioned = ConnectivityMgr().IsWiFiStationProvisioned(); + sIsWiFiEnabled = ConnectivityMgr().IsWiFiStationEnabled(); + sIsWiFiAttached = ConnectivityMgr().IsWiFiStationConnected(); + + PlatformMgr().UnlockChipStack(); + } + + // Update the status LED if factory reset has not been initiated. + // + // If system has "full connectivity", keep the LED On constantly. + // + // If thread and service provisioned, but not attached to the thread network + // yet OR no connectivity to the service OR subscriptions are not fully + // established THEN blink the LED Off for a short period of time. + // + // If the system has ble connection(s) uptill the stage above, THEN blink + // the LEDs at an even rate of 100ms. + // + // Otherwise, blink the LED ON for a very short time. + if (sAppTask.mFunction != kFunction_FactoryReset) + { + if (sIsWiFiProvisioned && sIsWiFiEnabled && !sIsWiFiAttached) + { + sStatusLED.Blink(950, 50); + } + else + { + sStatusLED.Blink(50, 950); + } + } + } +} + +void AppTask::LightActionEventHandler(AppEvent * aEvent) +{ + bool initiated = false; + LightingManager::Action_t action; + int32_t actor; + CHIP_ERROR err = CHIP_NO_ERROR; + + if (aEvent->Type == AppEvent::kEventType_Light) + { + action = static_cast(aEvent->LightEvent.Action); + actor = aEvent->LightEvent.Actor; + } + else if (aEvent->Type == AppEvent::kEventType_Button) + { + if (LightMgr().IsLightOn()) + { + action = LightingManager::OFF_ACTION; + } + else + { + action = LightingManager::ON_ACTION; + } + actor = AppEvent::kEventType_Button; + } + else + { + err = APP_ERROR_UNHANDLED_EVENT; + } + + if (err == CHIP_NO_ERROR) + { + initiated = LightMgr().InitiateAction(actor, action); + + if (!initiated) + { + MT793X_LOG("Action is already in progress or active."); + } + } +} + +void AppTask::ButtonTimerEventHandler(AppEvent * aEvent) +{ + if (aEvent->Type != AppEvent::kEventType_Timer || sAppTask.mFunctionTimerActive == false) + { + return; + } + + switch (sAppTask.mFunction) + { + case kFunction_NoneSelected: + break; + + case kFunction_LightSwitch: + // Start timer for user to cancel the facotry reset, if needed + MT793X_LOG("Factory Reset Triggered."); + MT793X_LOG("Release button within %ums to cancel.", FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + sAppTask.StartTimer(FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + sAppTask.mFunction = kFunction_FactoryReset; + + // Turn off all LEDs before starting blink to make sure blink is + // co-ordinated. + sStatusLED.Set(false); + sStatusLED.Blink(500); + break; + + case kFunction_FactoryReset: + MT793X_LOG("Factory Reset Start."); + // Actually trigger Factory Reset + sAppTask.mFunction = kFunction_NoneSelected; + ConfigurationMgr().InitiateFactoryReset(); + sStatusLED.Set(true); + break; + + default: + break; + } +} + +void AppTask::SingleButtonEventHandler(AppEvent * aEvent) +{ + if (aEvent->Type != AppEvent::kEventType_Button) + { + MT793X_LOG("A Non ButtonEvent received %d", aEvent->Type); + return; + } + + if (aEvent->ButtonEvent.Pressed) + { + if (sAppTask.mFunctionTimerActive == false) + { + /* Start the timer to detect how long Button has been pressed */ + MT793X_LOG("AppTask status LED on"); + sStatusLED.Set(true); + sAppTask.mFunction = kFunction_LightSwitch; + sAppTask.StartTimer(FACTORY_RESET_TRIGGER_TIMEOUT); + } + else + { + MT793X_LOG("AppTask function timer already started"); + } + } + else + { + /* Cancel the timer to detect how long Button has been pressed */ + sAppTask.CancelTimer(); + + switch (sAppTask.mFunction) + { + case kFunction_LightSwitch: + MT793X_LOG("AppTask light switch"); + AppEvent event; + event.Type = AppEvent::kEventType_Button; + LightActionEventHandler(&event); + break; + case kFunction_FactoryReset: + // factory reset cancelled, restore LED + MT793X_LOG("AppTask factory reset cancelled"); + break; + default: + MT793X_LOG("not handled key release event, mFunction = %x", sAppTask.mFunction); + break; + } + + sStatusLED.Set(false); + + sAppTask.mFunction = kFunction_NoneSelected; + } +} + +void AppTask::ButtonHandler(const filogic_button_t & button) +{ + AppEvent button_event = {}; + button_event.Type = AppEvent::kEventType_Button; + button_event.ButtonEvent.Pressed = button.press; + button_event.Handler = SingleButtonEventHandler; + sAppTask.PostEvent(&button_event); +} + +void AppTask::TimerEventHandler(TimerHandle_t xTimer) +{ + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = (void *) xTimer; + event.Handler = ButtonTimerEventHandler; + sAppTask.PostEvent(&event); +} + +void AppTask::CancelTimer() +{ + if (xTimerStop(sFunctionTimer, 0) == pdFAIL) + { + MT793X_LOG("app timer stop() failed"); + appError(APP_ERROR_STOP_TIMER_FAILED); + } + + mFunctionTimerActive = false; +} + +void AppTask::StartTimer(uint32_t aTimeoutInMs) +{ + if (xTimerIsTimerActive(sFunctionTimer)) + { + MT793X_LOG("app timer already started!"); + CancelTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ticks if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sFunctionTimer, aTimeoutInMs / portTICK_PERIOD_MS, 100) != pdPASS) + { + MT793X_LOG("app timer start() failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } + + mFunctionTimerActive = true; +} + +void AppTask::ActionInitiated(LightingManager::Action_t aAction, int32_t aActor) +{ + // Action initiated, update the light led + if (aAction == LightingManager::ON_ACTION) + { + MT793X_LOG("Turning light ON") + sLightLED.Set(true); + } + else if (aAction == LightingManager::OFF_ACTION) + { + MT793X_LOG("Turning light OFF") + sLightLED.Set(false); + } +} + +void AppTask::ActionCompleted(LightingManager::Action_t aAction) +{ + // action has been completed bon the light + if (aAction == LightingManager::ON_ACTION) + { + MT793X_LOG("Light ON") + } + else if (aAction == LightingManager::OFF_ACTION) + { + MT793X_LOG("Light OFF") + } +} + +void AppTask::PostLightActionRequest(int32_t aActor, LightingManager::Action_t aAction) +{ + AppEvent event; + event.Type = AppEvent::kEventType_Light; + event.LightEvent.Actor = aActor; + event.LightEvent.Action = aAction; + event.Handler = LightActionEventHandler; + PostEvent(&event); +} + +void AppTask::PostEvent(const AppEvent * aEvent) +{ + if (sAppEventQueue != NULL) + { + BaseType_t status; + if (xPortIsInsideInterrupt()) + { + BaseType_t higherPrioTaskWoken; + + higherPrioTaskWoken = pdFALSE; + status = xQueueSendFromISR(sAppEventQueue, aEvent, &higherPrioTaskWoken); + OS_YIELD_FROM_ISR(higherPrioTaskWoken); + } + else + { + status = xQueueSend(sAppEventQueue, aEvent, 1); + } + + if (!status) + MT793X_LOG("Failed to post event to app task event queue"); + } + else + { + MT793X_LOG("Event Queue is NULL should never happen"); + } +} + +void AppTask::DispatchEvent(AppEvent * aEvent) +{ + if (aEvent->Handler) + { + aEvent->Handler(aEvent); + } + else + { + MT793X_LOG("Event received with no handler. Dropping event."); + } +} diff --git a/examples/lighting-app/genio/src/LEDWidget.cpp b/examples/lighting-app/genio/src/LEDWidget.cpp new file mode 100644 index 00000000000000..15ef981f7654b2 --- /dev/null +++ b/examples/lighting-app/genio/src/LEDWidget.cpp @@ -0,0 +1,150 @@ +/* + * + * 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. + */ + +#include +#include + +#include + +#include "LEDWidget.h" + +void LEDWidget::TimerHandler(TimerHandle_t xTimer) +{ + LEDWidget * led_widget = (LEDWidget *) pvTimerGetTimerID(xTimer); + led_widget->Toggle(); +} + +void LEDWidget::StartTimer(uint32_t aTimeoutInMs) +{ + if (xTimerIsTimerActive(mTimer)) + CancelTimer(); + + assert(xTimerChangePeriod(mTimer, aTimeoutInMs / portTICK_PERIOD_MS, 100) == pdPASS); +} + +void LEDWidget::CancelTimer(void) +{ + assert(xTimerStop(mTimer, 0) == pdPASS); +} + +void LEDWidget::Init(enum led_id led) +{ + filogic_led_init(); + + mLed = led; + + mTimer = xTimerCreate(Name(), + 1, // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = app task obj context + TimerHandler); // timer callback handler +} + +const char * LEDWidget::Name(void) +{ + const char * name; + + switch (mLed) + { + case LED_LIGHT: + name = "LED_LIGHT"; + break; + case LED_STATUS: + name = "LED_STATUS"; + break; + default: + name = "LED UNKNOWN"; + break; + } + + return name; +} + +void LEDWidget::Toggle(void) +{ + Set(!mState); + StartTimer(mState ? mOn : mOff); +} + +void LEDWidget::DoBlink(void) +{ + StartTimer(mOn); +} + +void LEDWidget::DoSet(bool state) +{ + switch (mLed) + { + case LED_LIGHT: + filogic_led_light_toggle(state); + break; + case LED_STATUS: + filogic_led_status_toggle(state); + break; + } + mState = state; +} + +void LEDWidget::Set(bool state) +{ + CancelTimer(); + DoSet(state); + // printf("%s %s\n", Name(), state ? "on" : "off"); +} + +void LEDWidget::Blink(int on, int off) +{ + if (mOn != on || mOff != off) + { + mOn = on; + mOff = off; + // printf("%s blink: on %d off %d\n", Name(), mOn, mOff); + DoBlink(); + } +} + +void LEDWidget::Blink(int duration) +{ + Blink(duration, duration); +} + +void LEDWidget::Color(enum led_color color) +{ + filogic_led_color_t _color = FILOGIC_LED_OFF; + + switch (color) + { + case LED_RED: + _color = FILOGIC_LED_R; + case LED_GREEN: + _color = FILOGIC_LED_G; + case LED_BLUE: + _color = FILOGIC_LED_B; + } + + switch (mLed) + { + case LED_LIGHT: + filogic_led_light_color(_color); + break; + case LED_STATUS: + filogic_led_status_color(_color); + break; + } + + // printf("%s color %d\n", Name(), color); +} diff --git a/examples/lighting-app/genio/src/LightingManager.cpp b/examples/lighting-app/genio/src/LightingManager.cpp new file mode 100644 index 00000000000000..a9fcd2a0fc9789 --- /dev/null +++ b/examples/lighting-app/genio/src/LightingManager.cpp @@ -0,0 +1,225 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 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. + */ + +#include "LightingManager.h" + +#include "AppConfig.h" +#include "AppTask.h" +#include + +LightingManager LightingManager::sLight; + +TimerHandle_t sLightTimer; + +CHIP_ERROR LightingManager::Init() +{ + // Create FreeRTOS sw timer for light timer. + sLightTimer = xTimerCreate("lightTmr", // Just a text name, not used by the RTOS kernel + 1, // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = light obj context + TimerEventHandler // timer callback handler + ); + + if (sLightTimer == NULL) + { + MT793X_LOG("sLightTimer timer create failed"); + return APP_ERROR_CREATE_TIMER_FAILED; + } + + mState = kState_OffCompleted; + mAutoTurnOffTimerArmed = false; + mAutoTurnOff = false; + mAutoTurnOffDuration = 0; + + return CHIP_NO_ERROR; +} + +void LightingManager::SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB) +{ + mActionInitiated_CB = aActionInitiated_CB; + mActionCompleted_CB = aActionCompleted_CB; +} + +bool LightingManager::IsActionInProgress() +{ + return (mState == kState_OffInitiated || mState == kState_OnInitiated); +} + +bool LightingManager::IsLightOn() +{ + return (mState == kState_OnCompleted); +} + +void LightingManager::EnableAutoTurnOff(bool aOn) +{ + mAutoTurnOff = aOn; +} + +void LightingManager::SetAutoTurnOffDuration(uint32_t aDurationInSecs) +{ + mAutoTurnOffDuration = aDurationInSecs; +} + +bool LightingManager::InitiateAction(int32_t aActor, Action_t aAction) +{ + bool action_initiated = false; + State_t new_state; + + // Initiate Turn On/Off Action only when the previous one is complete. + if (mState == kState_OffCompleted && aAction == ON_ACTION) + { + action_initiated = true; + + new_state = kState_OnInitiated; + } + else if (mState == kState_OnCompleted && aAction == OFF_ACTION) + { + action_initiated = true; + + new_state = kState_OffInitiated; + } + + if (action_initiated) + { + if (mAutoTurnOffTimerArmed && new_state == kState_OffInitiated) + { + // If auto turn off timer has been armed and someone initiates turning off, + // cancel the timer and continue as normal. + mAutoTurnOffTimerArmed = false; + + CancelTimer(); + } + + StartTimer(ACTUATOR_MOVEMENT_PERIOS_MS); + + // Since the timer started successfully, update the state and trigger callback + mState = new_state; + + if (mActionInitiated_CB) + { + mActionInitiated_CB(aAction, aActor); + } + } + + return action_initiated; +} + +void LightingManager::StartTimer(uint32_t aTimeoutMs) +{ + if (xTimerIsTimerActive(sLightTimer)) + { + MT793X_LOG("app timer already started!"); + CancelTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ticks if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sLightTimer, (aTimeoutMs / portTICK_PERIOD_MS), 100) != pdPASS) + { + MT793X_LOG("sLightTimer timer start() failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } +} + +void LightingManager::CancelTimer(void) +{ + if (xTimerStop(sLightTimer, 0) == pdFAIL) + { + MT793X_LOG("sLightTimer stop() failed"); + appError(APP_ERROR_STOP_TIMER_FAILED); + } +} + +void LightingManager::TimerEventHandler(TimerHandle_t xTimer) +{ + // Get light obj context from timer id. + LightingManager * light = static_cast(pvTimerGetTimerID(xTimer)); + + // The timer event handler will be called in the context of the timer task + // once sLightTimer expires. Post an event to apptask queue with the actual handler + // so that the event can be handled in the context of the apptask. + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = light; + if (light->mAutoTurnOffTimerArmed) + { + event.Handler = AutoTurnOffTimerEventHandler; + } + else + { + event.Handler = ActuatorMovementTimerEventHandler; + } + GetAppTask().PostEvent(&event); +} + +void LightingManager::AutoTurnOffTimerEventHandler(AppEvent * aEvent) +{ + LightingManager * light = static_cast(aEvent->TimerEvent.Context); + int32_t actor = 0; + + // Make sure auto turn off timer is still armed. + if (!light->mAutoTurnOffTimerArmed) + { + return; + } + + light->mAutoTurnOffTimerArmed = false; + + MT793X_LOG("Auto Turn Off has been triggered!"); + + light->InitiateAction(actor, OFF_ACTION); +} + +void LightingManager::ActuatorMovementTimerEventHandler(AppEvent * aEvent) +{ + Action_t actionCompleted = INVALID_ACTION; + + LightingManager * light = static_cast(aEvent->TimerEvent.Context); + + if (light->mState == kState_OffInitiated) + { + light->mState = kState_OffCompleted; + actionCompleted = OFF_ACTION; + } + else if (light->mState == kState_OnInitiated) + { + light->mState = kState_OnCompleted; + actionCompleted = ON_ACTION; + } + + if (actionCompleted != INVALID_ACTION) + { + if (light->mActionCompleted_CB) + { + light->mActionCompleted_CB(actionCompleted); + } + + if (light->mAutoTurnOff && actionCompleted == ON_ACTION) + { + // Start the timer for auto turn off + light->StartTimer(light->mAutoTurnOffDuration * 1000); + + light->mAutoTurnOffTimerArmed = true; + + MT793X_LOG("Auto Turn off enabled. Will be triggered in %u seconds", light->mAutoTurnOffDuration); + } + } +} diff --git a/examples/lighting-app/genio/src/ZclCallbacks.cpp b/examples/lighting-app/genio/src/ZclCallbacks.cpp new file mode 100644 index 00000000000000..6f18c3b622c602 --- /dev/null +++ b/examples/lighting-app/genio/src/ZclCallbacks.cpp @@ -0,0 +1,91 @@ +/* + * + * Copyright (c) 2022 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. + */ + +/** + * @file + * This file implements the handler for data model messages. + */ + +#include "AppConfig.h" +#include "LightingManager.h" + +#include +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::app::Clusters; + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t mask, uint8_t type, + uint16_t size, uint8_t * value) +{ + ClusterId clusterId = attributePath.mClusterId; + AttributeId attributeId = attributePath.mAttributeId; + ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); + + if (clusterId == OnOff::Id && attributeId == OnOff::Attributes::OnOff::Id) + { + LightMgr().InitiateAction(AppEvent::kEventType_Light, *value ? LightingManager::ON_ACTION : LightingManager::OFF_ACTION); + } + else if (clusterId == LevelControl::Id) + { + ChipLogProgress(Zcl, "Level Control attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); + + // WIP Apply attribute change to Light + } + else if (clusterId == ColorControl::Id) + { + ChipLogProgress(Zcl, "Color Control attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); + + // WIP Apply attribute change to Light + } + else if (clusterId == OnOffSwitchConfiguration::Id) + { + ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); + + // WIP Apply attribute change to Light + } + else if (clusterId == Identify::Id) + { + ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); + } +} + +/** @brief OnOff Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + * TODO Issue #3841 + * emberAfOnOffClusterInitCallback happens before the stack initialize the cluster + * attributes to the default value. + * The logic here expects something similar to the deprecated Plugins callback + * emberAfPluginOnOffClusterServerPostInitCallback. + * + */ +void emberAfOnOffClusterInitCallback(EndpointId endpoint) +{ + // TODO: implement any additional Cluster Server init actions +} diff --git a/examples/lighting-app/genio/src/main.cpp b/examples/lighting-app/genio/src/main.cpp new file mode 100644 index 00000000000000..93bb82a21b0735 --- /dev/null +++ b/examples/lighting-app/genio/src/main.cpp @@ -0,0 +1,277 @@ +/* + * + * 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. + */ + +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include + +#include "AppConfig.h" +#include + +#ifdef HEAP_MONITORING +#include "MemMonitoring.h" +#endif + +#include + +#ifdef ENABLE_CHIP_SHELL +#include "matter_shell.h" +#endif + +#define WIFI_DEV_NAME "MediaTek-Light" + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::DeviceLayer; + +#define UNUSED_PARAMETER(a) (a = a) + +volatile int apperror_cnt; + +/*************************************************************************** + * Application Error hang + ****************************************************************************/ + +void appError(int err) +{ + printf("!!!!!!!!!!!! Application Critical Error: %d !!!!!!!!!!!", err); + portDISABLE_INTERRUPTS(); + while (1) + ; +} + +void appError(CHIP_ERROR error) +{ + appError(static_cast(error.AsInteger())); +} + +/*************************************************************************** + * FORWARD DECLARATIONS + ****************************************************************************/ + +extern "C" void system_init(void); + +void vStartTask(void * pvParameters); + +/*************************************************************************** + * FreeRTOS callback functions + ****************************************************************************/ + +#if (configUSE_DAEMON_TASK_STARTUP_HOOK == 1) + +extern "C" void vApplicationDaemonTaskStartupHook(void) +{ +#define START_TASK_STACK_SIZE (1000) + BaseType_t xReturned; + + xReturned = xTaskCreate(vStartTask, /* Function that implements the task. */ + "startTask", /* Text name for the task. */ + START_TASK_STACK_SIZE, /* Stack size in words, not bytes. */ + (void *) 0, /* Parameter passed into the task. */ + tskIDLE_PRIORITY, /* Priority at which the task is created. */ + NULL); /* Used to pass out the created task's handle. */ + + configASSERT(xReturned == pdPASS); +} + +#endif /* configUSE_DAEMON_TASK_STARTUP_HOOK */ + +#if (configUSE_IDLE_HOOK == 1) + +/* for idle task feed wdt (DO NOT enter sleep mode)*/ +extern "C" void vApplicationIdleHook(void) +{ +#ifdef MTK_SYSTEM_HANG_CHECK_ENABLE +#ifdef HAL_WDT_MODULE_ENABLED + hal_wdt_feed(HAL_WDT_FEED_MAGIC); +#endif +#endif +} + +#endif /* configUSE_IDLE_HOOK */ + +#if (configSUPPORT_STATIC_ALLOCATION == 1) + +extern "C" void vApplicationGetTimerTaskMemory(StaticTask_t ** ppxTimerTaskTCBBuffer, StackType_t ** ppxTimerTaskStackBuffer, + uint32_t * pulTimerTaskStackSize) +{ + *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH; + *ppxTimerTaskTCBBuffer = (StaticTask_t *) pvPortMalloc(sizeof(StaticTask_t)); + if (*ppxTimerTaskTCBBuffer != NULL) + { + *ppxTimerTaskStackBuffer = (StackType_t *) pvPortMalloc((((size_t) *pulTimerTaskStackSize) * sizeof(StackType_t))); + } +} + +extern "C" void vApplicationGetIdleTaskMemory(StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, + uint32_t * pulIdleTaskStackSize) +{ + *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE; + *ppxIdleTaskTCBBuffer = (StaticTask_t *) pvPortMalloc(sizeof(StaticTask_t)); + if (*ppxIdleTaskTCBBuffer != NULL) + { + *ppxIdleTaskStackBuffer = (StackType_t *) pvPortMalloc((((size_t) *pulIdleTaskStackSize) * sizeof(StackType_t))); + } +} + +#endif /* configSUPPORT_STATIC_ALLOCATION */ + +/******************************************************************************* + * DECLARATIONS + ******************************************************************************/ + +void mt793xLog(const char * aFormat, ...) +{ + va_list vargs; + + va_start(vargs, aFormat); + vprintf(aFormat, vargs); + va_end(vargs); + printf("\n"); +} + +void mt793xLogRedirectCallback(const char * module, uint8_t category, const char * msg, va_list args) +{ + int len; + char * buf; + + len = strlen(module) + 1 + vsnprintf(NULL, 0, msg, args) + 1; + buf = (char *) malloc(len); + if (buf) + { + len = sprintf(buf, "%s ", module); + vsprintf(buf + len, msg, args); + printf("%s\n", buf); + free(buf); + } +} + +void mt793xSwdPortConfig(void) +{ + *(volatile uint32_t *) 0x30404358 = 0x00070700; + *(volatile uint32_t *) 0x30404354 = 0x00020200; + *(volatile uint32_t *) 0x304030e0 = 0x1e8210; + *(volatile uint32_t *) 0x304030d4 = 0; +} + +/*************************************************************************** + * Button Callback + ****************************************************************************/ + +void vButtonCallback(const filogic_button_t * button_event) +{ + GetAppTask().ButtonHandler(*button_event); +} + +/*************************************************************************** + * Supplicant Log Redirect + ****************************************************************************/ + +extern "C" { +void mt793x_wpa_log_cb(void * ctx, int level, int type, const char * txt, size_t len) +{ + /* ignore ctx, type, len */ + (void) ctx; + (void) level; + (void) len; + + ChipLogProgress(DeviceLayer, "[%lu] FILOGIC supp %s", xTaskGetTickCount(), txt); +} + +void wpa_msg_register_cb(void *); +} + +/*************************************************************************** + * Startup task + ****************************************************************************/ + +void vStartRunning(void) +{ + CHIP_ERROR error; + + chip::Logging::SetLogRedirectCallback(mt793xLogRedirectCallback); + + wpa_msg_register_cb((void *) mt793x_wpa_log_cb); + + assert(chip::Platform::MemoryInit() == CHIP_NO_ERROR); + + assert(chip::DeviceLayer::PlatformMgr().InitChipStack() == CHIP_NO_ERROR); + + // Wi-Fi ? + // chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(BLE_DEV_NAME); + + assert(chip::DeviceLayer::PlatformMgr().StartEventLoopTask() == CHIP_NO_ERROR); + + assert(GetAppTask().StartAppTask() == CHIP_NO_ERROR); + + assert(filogic_button_set_callback(vButtonCallback)); + + assert(filogic_button_init()); + +#ifdef ENABLE_CHIP_SHELL + chip::startShellTask(); +#endif +} + +void vStartTask(void * pvParameters) +{ + (void) pvParameters; + + vStartRunning(); + + vTaskDelete(NULL); +} + +/*************************************************************************** + * Main Function + ****************************************************************************/ + +extern "C" int main(void) +{ + mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); + +#ifdef HEAP_MONITORING + MemMonitoring::startHeapMonitoring(); +#endif + + system_init(); + + mt793xSwdPortConfig(); + + vTaskStartScheduler(); + + chip::Platform::MemoryShutdown(); + + // Should never get here. + while (1) + ; + + return 0; +} diff --git a/examples/lighting-app/genio/third_party/connectedhomeip b/examples/lighting-app/genio/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/lighting-app/genio/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/lighting-app/genio/with_pw_rpc.gni b/examples/lighting-app/genio/with_pw_rpc.gni new file mode 100644 index 00000000000000..581b4f415d5654 --- /dev/null +++ b/examples/lighting-app/genio/with_pw_rpc.gni @@ -0,0 +1,27 @@ +# 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. + +# add this gni as import in your build args to use pigweed in the example +# 'import("//with_pw_rpc.gni")' + +import("//build_overrides/chip.gni") +import("${chip_root}/config/mt793x/lib/pw_rpc/pw_rpc.gni") +import("${chip_root}/examples/platform/mt793x/args.gni") + +mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +chip_enable_pw_rpc = true +chip_enable_openthread = true + +cpp_standard = "gnu++17" diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index 13e78387cc4a99..25b89e41b29ddc 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -44,6 +45,8 @@ #include #include +using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::TLV; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; @@ -55,6 +58,7 @@ using namespace ::chip::DeviceLayer; #define APP_TASK_STACK_SIZE (3 * 1024) #define APP_TASK_PRIORITY 2 #define APP_EVENT_QUEUE_SIZE 10 +#define QPG_LIGHT_ENDPOINT_ID (1) namespace { TaskHandle_t sAppTaskHandle; @@ -587,23 +591,17 @@ void AppTask::DispatchEvent(AppEvent * aEvent) */ void AppTask::UpdateClusterState(void) { - uint8_t newValue; - ChipLogProgress(NotSpecified, "UpdateClusterState"); - // write the new on/off value - newValue = LightingMgr().IsTurnedOn(); - EmberAfStatus status = - emberAfWriteAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &newValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + // Write the new on/off value + EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(QPG_LIGHT_ENDPOINT_ID, LightingMgr().IsTurnedOn()); if (status != EMBER_ZCL_STATUS_SUCCESS) { ChipLogError(NotSpecified, "ERR: updating on/off %x", status); } - newValue = LightingMgr().GetLevel(); - status = emberAfWriteAttribute(1, ZCL_LEVEL_CONTROL_CLUSTER_ID, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, (uint8_t *) &newValue, - ZCL_INT8U_ATTRIBUTE_TYPE); - + // Write new level value + status = Clusters::LevelControl::Attributes::CurrentLevel::Set(QPG_LIGHT_ENDPOINT_ID, LightingMgr().GetLevel()); if (status != EMBER_ZCL_STATUS_SUCCESS) { ChipLogError(NotSpecified, "ERR: updating level %x", status); diff --git a/examples/lock-app/qpg/src/AppTask.cpp b/examples/lock-app/qpg/src/AppTask.cpp index 86a28d5e9bb863..779585d6a9074f 100644 --- a/examples/lock-app/qpg/src/AppTask.cpp +++ b/examples/lock-app/qpg/src/AppTask.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -41,6 +42,8 @@ #include #include +using namespace ::chip; +using namespace ::chip::app; using namespace chip::TLV; using namespace chip::Credentials; using namespace chip::DeviceLayer; @@ -54,6 +57,7 @@ using namespace chip::DeviceLayer; #define APP_TASK_STACK_SIZE (3 * 1024) #define APP_TASK_PRIORITY 2 #define APP_EVENT_QUEUE_SIZE 10 +#define QPG_LOCK_ENDPOINT_ID (1) namespace { TaskHandle_t sAppTaskHandle; @@ -538,13 +542,10 @@ void AppTask::DispatchEvent(AppEvent * aEvent) */ void AppTask::UpdateClusterState(void) { - uint8_t newValue = !BoltLockMgr().IsUnlocked(); - ChipLogProgress(NotSpecified, "UpdateClusterState"); // write the new on/off value - EmberAfStatus status = - emberAfWriteAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &newValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(QPG_LOCK_ENDPOINT_ID, !BoltLockMgr().IsUnlocked()); if (status != EMBER_ZCL_STATUS_SUCCESS) { ChipLogError(NotSpecified, "ERR: updating on/off %x", status); diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index 9e59d2e63605be..5a2f22034cab10 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -323,7 +323,8 @@ void ChipLinuxAppMainLoop() #if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE ChipLogProgress(AppServer, "Starting commissioner"); VerifyOrReturn(InitCommissioner(LinuxDeviceOptions::GetInstance().securedCommissionerPort + 10, - LinuxDeviceOptions::GetInstance().unsecuredCommissionerPort) == CHIP_NO_ERROR); + LinuxDeviceOptions::GetInstance().unsecuredCommissionerPort, + LinuxDeviceOptions::GetInstance().commissionerFabricId) == CHIP_NO_ERROR); ChipLogProgress(AppServer, "Started commissioner"); #if defined(ENABLE_CHIP_SHELL) Shell::RegisterControllerCommands(); diff --git a/examples/platform/linux/CommissionerMain.cpp b/examples/platform/linux/CommissionerMain.cpp index 7e8bdbc7a39b5c..2d5cad2564f757 100644 --- a/examples/platform/linux/CommissionerMain.cpp +++ b/examples/platform/linux/CommissionerMain.cpp @@ -30,7 +30,10 @@ #include #include +#include +#include #include +#include #include #include #include @@ -110,6 +113,8 @@ class MyCommissionerCallback : public CommissionerCallback } }; +AutoCommissioner gAutoCommissioner; + DeviceCommissioner gCommissioner; CommissionerDiscoveryController gCommissionerDiscoveryController; MyCommissionerCallback gCommissionerCallback; @@ -117,9 +122,8 @@ MyServerStorageDelegate gServerStorage; ExampleOperationalCredentialsIssuer gOpCredsIssuer; NodeId gLocalId = kMaxOperationalNodeId; Credentials::GroupDataProviderImpl gGroupDataProvider; -AutoCommissioner gAutoCommissioner; -CHIP_ERROR InitCommissioner(uint16_t commissionerPort, uint16_t udcListenPort) +CHIP_ERROR InitCommissioner(uint16_t commissionerPort, uint16_t udcListenPort, FabricId fabricId) { Controller::FactoryInitParams factoryParams; Controller::SetupParams params; @@ -140,6 +144,10 @@ CHIP_ERROR InitCommissioner(uint16_t commissionerPort, uint16_t udcListenPort) params.controllerVendorId = static_cast(vendorId); ReturnErrorOnFailure(gOpCredsIssuer.Initialize(gServerStorage)); + if (fabricId != kUndefinedFabricId) + { + gOpCredsIssuer.SetFabricIdForNextNOCRequest(fabricId); + } // No need to explicitly set the UDC port since we will use default ChipLogProgress(Support, " ----- UDC listening on port %d", udcListenPort); @@ -175,6 +183,11 @@ CHIP_ERROR InitCommissioner(uint16_t commissionerPort, uint16_t udcListenPort) params.defaultCommissioner = &gAutoCommissioner; + // assign prefered feature settings + CommissioningParameters commissioningParams = gAutoCommissioner.GetCommissioningParameters(); + commissioningParams.SetCheckForMatchingFabric(true); + gAutoCommissioner.SetCommissioningParameters(commissioningParams); + auto & factory = Controller::DeviceControllerFactory::GetInstance(); ReturnErrorOnFailure(factory.Init(factoryParams)); ReturnErrorOnFailure(factory.SetupCommissioner(params, gCommissioner)); @@ -201,8 +214,9 @@ CHIP_ERROR InitCommissioner(uint16_t commissionerPort, uint16_t udcListenPort) // advertise operational since we are an admin app::DnssdServer::Instance().AdvertiseOperational(); - ChipLogProgress(Support, "InitCommissioner nodeId=0x" ChipLogFormatX64 " fabricIndex=0x%x", - ChipLogValueX64(gCommissioner.GetNodeId()), static_cast(fabricIndex)); + ChipLogProgress(Support, + "InitCommissioner nodeId=0x" ChipLogFormatX64 " fabric.fabricId=0x" ChipLogFormatX64 " fabricIndex=0x%x", + ChipLogValueX64(gCommissioner.GetNodeId()), ChipLogValueX64(fabricId), static_cast(fabricIndex)); return CHIP_NO_ERROR; } @@ -231,6 +245,10 @@ class PairingCommand : public Controller::DevicePairingDelegate void OnPairingDeleted(CHIP_ERROR error) override; void OnCommissioningComplete(NodeId deviceId, CHIP_ERROR error) override; + void OnCommissioningStatusUpdate(PeerId peerId, CommissioningStage stageCompleted, CHIP_ERROR error) override; + + void OnReadCommissioningInfo(const ReadCommissioningInfo & info) override; + private: #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED static void OnDeviceConnectedFn(void * context, chip::Messaging::ExchangeManager & exchangeMgr, @@ -292,7 +310,8 @@ void PairingCommand::OnCommissioningComplete(NodeId nodeId, CHIP_ERROR err) #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED ChipLogProgress(AppServer, "Device commissioning completed with success - getting OperationalDeviceProxy"); - gCommissioner.GetConnectedDevice(nodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); + gCommissioner.GetConnectedDevice(gAutoCommissioner.GetCommissioningParameters().GetRemoteNodeId().ValueOr(nodeId), + &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); #else // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED ChipLogProgress(AppServer, "Device commissioning completed with success"); #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED @@ -310,6 +329,32 @@ void PairingCommand::OnCommissioningComplete(NodeId nodeId, CHIP_ERROR err) } } +void PairingCommand::OnCommissioningStatusUpdate(PeerId peerId, CommissioningStage stageCompleted, CHIP_ERROR error) +{ + ChipLogProgress(AppServer, "OnCommissioningStatusUpdate - stageCompleted='%s' error='%s'", StageToString(stageCompleted), + ErrorStr(error)); + + // if we have successfully finished attestation AND this device already has a NodeId on our fabric + // then stop commissioning and attempt to connect to it. + if (stageCompleted == CommissioningStage::kAttestationVerification && error == CHIP_NO_ERROR && + gAutoCommissioner.GetCommissioningParameters().GetRemoteNodeId().HasValue()) + { + gAutoCommissioner.StopCommissioning(); + } +} + +void PairingCommand::OnReadCommissioningInfo(const ReadCommissioningInfo & info) +{ + ChipLogProgress(AppServer, "OnReadCommissioningInfo - vendorId=0x%04X productId=0x%04X", info.basic.vendorId, + info.basic.productId); + + if (info.nodeId != kUndefinedNodeId) + { + ChipLogProgress(AppServer, "ALREADY ON FABRIC WITH nodeId=0x" ChipLogFormatX64, ChipLogValueX64(info.nodeId)); + // wait until attestation verification before cancelling so we can validate vid/pid + } +} + #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED void PairingCommand::OnDeviceConnectedFn(void * context, Messaging::ExchangeManager & exchangeMgr, SessionHandle & sessionHandle) diff --git a/examples/platform/linux/CommissionerMain.h b/examples/platform/linux/CommissionerMain.h index 679fe7c847fec6..e241d436c4e71f 100644 --- a/examples/platform/linux/CommissionerMain.h +++ b/examples/platform/linux/CommissionerMain.h @@ -34,7 +34,7 @@ using chip::Transport::PeerAddress; CHIP_ERROR CommissionerPairOnNetwork(uint32_t pincode, uint16_t disc, PeerAddress address); CHIP_ERROR CommissionerPairUDC(uint32_t pincode, size_t index); -CHIP_ERROR InitCommissioner(uint16_t commissionerPort, uint16_t udcListenPort); +CHIP_ERROR InitCommissioner(uint16_t commissionerPort, uint16_t udcListenPort, chip::FabricId fabricId = chip::kUndefinedFabricId); void ShutdownCommissioner(); DeviceCommissioner * GetDeviceCommissioner(); diff --git a/examples/platform/linux/Options.cpp b/examples/platform/linux/Options.cpp index 73fe3568bdcda0..f7ca12dd981698 100644 --- a/examples/platform/linux/Options.cpp +++ b/examples/platform/linux/Options.cpp @@ -72,6 +72,7 @@ enum kOptionCSRResponseAttestationSignatureInvalid = 0x101d, kOptionCSRResponseCSRExistingKeyPair = 0x101e, kDeviceOption_TestEventTriggerEnableKey = 0x101f, + kCommissionerOption_FabricID = 0x1020, }; constexpr unsigned kAppUsageLength = 64; @@ -117,6 +118,7 @@ OptionDef sDeviceOptionDefs[] = { { "cert_error_attestation_signature_incorrect_type", kNoArgument, kOptionCSRResponseAttestationSignatureIncorrectType }, { "cert_error_attestation_signature_invalid", kNoArgument, kOptionCSRResponseAttestationSignatureInvalid }, { "enable-key", kArgumentRequired, kDeviceOption_TestEventTriggerEnableKey }, + { "commissioner-fabric-id", kArgumentRequired, kCommissionerOption_FabricID }, {} }; @@ -182,6 +184,9 @@ const char * sDeviceOptionHelp = " --unsecured-commissioner-port \n" " A 16-bit unsigned integer specifying the port to use for unsecured commissioner messages (default is 5550).\n" "\n" + " --commissioner-fabric-id \n" + " The fabric ID to be used when this device is a commissioner (default in code is 1).\n" + "\n" " --command \n" " A name for a command to execute during startup.\n" "\n" @@ -460,6 +465,11 @@ bool HandleOption(const char * aProgram, OptionSet * aOptions, int aIdentifier, break; } + case kCommissionerOption_FabricID: { + char * eptr; + LinuxDeviceOptions::GetInstance().commissionerFabricId = (chip::FabricId) strtoull(aValue, &eptr, 0); + break; + } default: PrintArgError("%s: INTERNAL ERROR: Unhandled option: %s\n", aProgram, aName); diff --git a/examples/platform/linux/Options.h b/examples/platform/linux/Options.h index 00817f95a16378..7f2a5f258d2d69 100644 --- a/examples/platform/linux/Options.h +++ b/examples/platform/linux/Options.h @@ -60,6 +60,7 @@ struct LinuxDeviceOptions chip::Credentials::DeviceAttestationCredentialsProvider * dacProvider = nullptr; chip::CSRResponseOptions mCSRResponseOptions; uint8_t testEventTriggerEnableKey[16] = { 0 }; + chip::FabricId commissionerFabricId = chip::kUndefinedFabricId; static LinuxDeviceOptions & GetInstance(); }; diff --git a/examples/platform/mt793x/BUILD.gn b/examples/platform/mt793x/BUILD.gn new file mode 100644 index 00000000000000..cc3800b18be941 --- /dev/null +++ b/examples/platform/mt793x/BUILD.gn @@ -0,0 +1,66 @@ +# 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("//build_overrides/mt793x_sdk.gni") +import("${chip_root}/src/lib/lib.gni") +import("${mt793x_sdk_build_root}/mt793x_sdk.gni") + +config("chip_examples_project_config") { + include_dirs = [ "project_include" ] + + # Link options that provide a replacement for dynamic memory operations in standard + # library with the FreeRTOS malloc in platform code. + ldflags = [ + # memory allocation -- these must be re-entrant and do locking + "-Wl,--wrap=malloc", + "-Wl,--wrap=free", + "-Wl,--wrap=realloc", + "-Wl,--wrap=calloc", + "-Wl,--wrap=calloc", + "-Wl,--wrap=MemoryAlloc", + + # Wrap these in case internal newlib call them (e.g. strdup will) + # directly call _malloc_r) + "-Wl,--wrap=_malloc_r", + "-Wl,--wrap=_realloc_r", + "-Wl,--wrap=_free_r", + "-Wl,--wrap=_calloc_r", + "-Wl,--wrap=_write", + + "-Wl,--wrap=__assert_function", + "-Wl,--wrap=wlan_printf", + "-Wl,--wrap=_gettimeofday", + ] +} + +source_set("genio-matter-shell") { + if (chip_build_libshell) { + defines = [ "ENABLE_CHIP_SHELL" ] + + sources = [ + "link_wrapper.c", + "matter_shell.cpp", + ] + include_dirs = [ "." ] + + public_deps = [ + "${chip_root}/examples/shell/shell_common:shell_common", + "${chip_root}/src/lib/shell:shell", + "${chip_root}/src/lib/shell:shell_core", + ] + } + + public_configs = [ ":chip_examples_project_config" ] +} diff --git a/examples/platform/mt793x/LEDWidget.cpp b/examples/platform/mt793x/LEDWidget.cpp new file mode 100644 index 00000000000000..960995545e6efb --- /dev/null +++ b/examples/platform/mt793x/LEDWidget.cpp @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 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. + */ + +#include "LEDWidget.h" +#include "sl_simple_led_instances.h" + +#include + +using namespace ::chip::System; + +void LEDWidget::InitGpio(void) +{ + // Sets gpio pin mode for ALL board Leds. + sl_simple_led_init_instances(); +} + +void LEDWidget::Init(const sl_led_t * led) +{ + mLastChangeTimeMS = 0; + mBlinkOnTimeMS = 0; + mBlinkOffTimeMS = 0; + mLed = led; + + Set(false); +} + +void LEDWidget::Invert(void) +{ + if (mLed) + { + sl_led_toggle(mLed); + } +} + +void LEDWidget::Set(bool state) +{ + mLastChangeTimeMS = mBlinkOnTimeMS = mBlinkOffTimeMS = 0; + if (mLed) + { + state ? sl_led_turn_on(mLed) : sl_led_turn_off(mLed); + } +} + +void LEDWidget::Blink(uint32_t changeRateMS) +{ + Blink(changeRateMS, changeRateMS); +} + +void LEDWidget::Blink(uint32_t onTimeMS, uint32_t offTimeMS) +{ + mBlinkOnTimeMS = onTimeMS; + mBlinkOffTimeMS = offTimeMS; + Animate(); +} + +void LEDWidget::Animate() +{ + if (mBlinkOnTimeMS != 0 && mBlinkOffTimeMS != 0) + { + uint64_t nowMS = chip::System::SystemClock().GetMonotonicMilliseconds64().count(); + uint64_t stateDurMS = sl_led_get_state(mLed) ? mBlinkOnTimeMS : mBlinkOffTimeMS; + uint64_t nextChangeTimeMS = mLastChangeTimeMS + stateDurMS; + + if (nextChangeTimeMS < nowMS) + { + Invert(); + mLastChangeTimeMS = nowMS; + } + } +} diff --git a/examples/platform/mt793x/LEDWidget.h b/examples/platform/mt793x/LEDWidget.h new file mode 100644 index 00000000000000..d779cb9d3ef4b6 --- /dev/null +++ b/examples/platform/mt793x/LEDWidget.h @@ -0,0 +1,41 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 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. + */ + +#pragma once + +#include "sl_led.h" +#include + +class LEDWidget +{ +public: + static void InitGpio(void); + void Init(const sl_led_t * led); + void Set(bool state); + void Invert(void); + void Blink(uint32_t changeRateMS); + void Blink(uint32_t onTimeMS, uint32_t offTimeMS); + void Animate(); + +private: + uint64_t mLastChangeTimeMS; + uint32_t mBlinkOnTimeMS; + uint32_t mBlinkOffTimeMS; + const sl_led_t * mLed; +}; diff --git a/examples/platform/mt793x/args.gni b/examples/platform/mt793x/args.gni new file mode 100644 index 00000000000000..1726b62a75d86b --- /dev/null +++ b/examples/platform/mt793x/args.gni @@ -0,0 +1,21 @@ +# 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") + +chip_ble_project_config_include = "" +chip_device_project_config_include = "" +chip_project_config_include = "" +chip_inet_project_config_include = "" +chip_system_project_config_include = "" diff --git a/examples/platform/mt793x/link_wrapper.c b/examples/platform/mt793x/link_wrapper.c new file mode 100644 index 00000000000000..8a4cf726a57533 --- /dev/null +++ b/examples/platform/mt793x/link_wrapper.c @@ -0,0 +1,105 @@ +/* + * All linker intercepted functions were listed in this file. + * + * Some of them were implemented in newlib nad unable to replace easily, + * some are skipped due to link order. + */ + +/****************************************************************************/ + +#include + +extern int log_write(char * buf, int len); + +int __wrap__write(int file, char * ptr, int len) +{ + return log_write(ptr, len); +} + +/****************************************************************************/ + +#include "FreeRTOS.h" +#include "task.h" +#include +#include + +int __wrap__gettimeofday(struct timeval * tv, void * ptz) +{ + int ticks = xTaskGetTickCount(); + if (tv != NULL) + { + tv->tv_sec = (ticks / 1000); + tv->tv_usec = (ticks % 1000) * 1000; + return 0; + } + + return -1; +} + +/****************************************************************************/ + +#include +#include + +extern void platform_assert(const char * expr, const char * file, int line); + +void __assert_func(const char * file, int line, const char * func, const char * expr) +{ + fflush(NULL); + platform_assert(expr, file, line); + while (1) + ; +} + +/****************************************************************************/ + +#include + +#include +#include + +void * __wrap__malloc_r(void * REENT, size_t size) +{ + void * p = pvPortMalloc(size); + while (!p) + ; + return p; +} + +void __wrap__free_r(void * REENT, void * ptr) +{ + return vPortFree(ptr); +} + +void * __wrap__realloc_r(void * REENT, void * ptr, size_t size) +{ + void * p = pvPortRealloc(ptr, size); + while (!p) + ; + return p; +} + +/****************************************************************************/ + +#include +#include + +extern void mt793xLog(const char * aFormat, ...); + +extern void mt793x_wpa_log_cb(void * ctx, int level, int type, const char * txt, size_t len); + +void __wrap__wlan_printf(int skip, int level, const char * fmt, ...) +{ + va_list ap; + + if (skip) + return; + + va_start(ap, fmt); + + mt793xLog(fmt, ap); + + va_end(ap); +} + +/****************************************************************************/ diff --git a/examples/platform/mt793x/matter_shell.cpp b/examples/platform/mt793x/matter_shell.cpp new file mode 100644 index 00000000000000..fcbcda2842652d --- /dev/null +++ b/examples/platform/mt793x/matter_shell.cpp @@ -0,0 +1,86 @@ +/* + * + * 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. + */ + +#include "matter_shell.h" +#include +#include +#include +#include +#include + +using namespace ::chip; +using chip::Shell::Engine; + +namespace { + +#define SHELL_TASK_STACK_SIZE 2048 +#define SHELL_TASK_PRIORITY 5 +TaskHandle_t shellTaskHandle; +StackType_t shellStack[SHELL_TASK_STACK_SIZE / sizeof(StackType_t)]; +StaticTask_t shellTaskStruct; + +void MatterShellTask(void * args) +{ + chip::Shell::Engine::Root().RunMainLoop(); +} + +} // namespace + +extern "C" unsigned int sleep(unsigned int seconds) +{ + const TickType_t xDelay = 1000 * seconds / portTICK_PERIOD_MS; + vTaskDelay(xDelay); + return 0; +} + +namespace chip { + +void NotifyShellProcess() +{ + xTaskNotifyGive(shellTaskHandle); +} + +void NotifyShellProcessFromISR(void) +{ + BaseType_t yieldRequired = pdFALSE; + if (shellTaskHandle != NULL) + { + vTaskNotifyGiveFromISR(shellTaskHandle, &yieldRequired); + } + portYIELD_FROM_ISR(yieldRequired); +} + +void WaitForShellActivity(void) +{ + ulTaskNotifyTake(pdTRUE, portMAX_DELAY); +} + +void startShellTask(void) +{ + int status = chip::Shell::Engine::Root().Init(); + assert(status == 0); + + // For now also register commands from shell_common (shell app). + // TODO move at least OTCLI to default commands in lib/shell/commands + cmd_misc_init(); + cmd_otcli_init(); + + shellTaskHandle = xTaskCreateStatic(MatterShellTask, "matter_cli", ArraySize(shellStack), NULL, SHELL_TASK_PRIORITY, shellStack, + &shellTaskStruct); +} + +} // namespace chip diff --git a/examples/platform/mt793x/matter_shell.h b/examples/platform/mt793x/matter_shell.h new file mode 100644 index 00000000000000..fe49bc7f27560d --- /dev/null +++ b/examples/platform/mt793x/matter_shell.h @@ -0,0 +1,27 @@ +/* + * + * 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. + */ + +#pragma once + +namespace chip { + +void NotifyShellProcess(void); +void NotifyShellProcessFromISR(void); +void WaitForShellActivity(void); +void startShellTask(void); + +} // namespace chip diff --git a/examples/shell/genio/.gn b/examples/shell/genio/.gn new file mode 100644 index 00000000000000..540d01ce0b2bfd --- /dev/null +++ b/examples/shell/genio/.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2022 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") +} diff --git a/examples/shell/genio/BUILD.gn b/examples/shell/genio/BUILD.gn new file mode 100644 index 00000000000000..08a6eb9c2186f0 --- /dev/null +++ b/examples/shell/genio/BUILD.gn @@ -0,0 +1,85 @@ +# Copyright (c) 2022 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") +import("//build_overrides/chip.gni") +import("//build_overrides/mt793x_sdk.gni") + +#import("${chip_root}/build/chip/tools.gni") + +import("${build_root}/config/defaults.gni") +import("${chip_root}/src/platform/device.gni") +import("${mt793x_sdk_build_root}/mt793x_executable.gni") +import("${mt793x_sdk_build_root}/mt793x_sdk.gni") + +assert(current_os == "freertos") + +mt793x_project_dir = "${chip_root}/examples/shell/genio" +mt793x_ex_plat_dir = "${chip_root}/examples/platform/mt793x" + +declare_args() { + # Dump memory usage at link time. + chip_print_memory_usage = true +} + +mt793x_sdk("sdk") { + sources = [ "${mt793x_project_dir}/include/CHIPProjectConfig.h" ] + + include_dirs = [ + "${chip_root}/src/platform/mt793x", + "${mt793x_project_dir}/include", + "${mt793x_ex_plat_dir}", + ] +} + +mt793x_executable("shell_app") { + output_name = "chip-mt793x-shell-example.out" + + sources = [ "src/main.cpp" ] + + deps = [ + ":sdk", + "${chip_root}/examples/shell/shell_common:shell_common", + "${chip_root}/src/lib", + "${chip_root}/src/platform", + "${mt793x_ex_plat_dir}:genio-matter-shell", + ] + + include_dirs = [ "include" ] + + defines = [] + + ldscript = "mt793x_xip.ld" + + inputs = [ ldscript ] + + ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] + + if (chip_print_memory_usage) { + ldflags += [ + "-Wl,--print-memory-usage", + "-fstack-usage", + ] + } + + output_dir = root_out_dir +} + +group("mt793x") { + deps = [ ":shell_app" ] +} + +group("default") { + deps = [ ":mt793x" ] +} diff --git a/examples/shell/genio/args.gni b/examples/shell/genio/args.gni new file mode 100644 index 00000000000000..bad599b058328d --- /dev/null +++ b/examples/shell/genio/args.gni @@ -0,0 +1,29 @@ +# Copyright (c) 2022 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/pigweed.gni") +import("${chip_root}/src/platform/mt793x/args.gni") + +mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" +pw_assert_BACKEND = "$dir_pw_assert_log" + +chip_enable_ble = false +chip_config_network_layer_ble = false + +chip_enable_openthread = false +chip_openthread_ftd = false +chip_build_libshell = true diff --git a/examples/shell/genio/build_overrides b/examples/shell/genio/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/shell/genio/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/shell/genio/include/CHIPProjectConfig.h b/examples/shell/genio/include/CHIPProjectConfig.h new file mode 100644 index 00000000000000..62af9bb3d76a78 --- /dev/null +++ b/examples/shell/genio/include/CHIPProjectConfig.h @@ -0,0 +1,117 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 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 a default pairing 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 +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 + +// For convenience, Chip Security Test Mode can be enabled and the +// requirement for authentication in various protocols can be disabled. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 +#define CHIP_CONFIG_REQUIRE_AUTH 1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0x1373: MediaTek's Vendor Id. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x1373 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + * 0x1003: Genio shell + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x1003 + +/** + * 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 1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP service 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 "0.1ALPHA" +#endif +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + * + * Enable support for Chip-over-BLE (CHIPoBLE). + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 0 + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote Chip Time service + * using the Chip Time Sync protocol. + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 + +/** + * 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" + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +#define _NO_NETWORK_COMMISSIONING_DRIVER_ diff --git a/examples/shell/genio/mt793x_xip.ld b/examples/shell/genio/mt793x_xip.ld new file mode 100644 index 00000000000000..fc3304bbec627b --- /dev/null +++ b/examples/shell/genio/mt793x_xip.ld @@ -0,0 +1,385 @@ +/* + * MT7933 CM33 Memory Map + */ + +HIDDEN(__STACK_SIZE = 0x1000); +HIDDEN(__SYSRAM_OFFSET = 0x0); + +OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") +OUTPUT_ARCH(arm) + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Memory Spaces Definitions: 16MB flash */ +MEMORY +{ + ROM_BL(rx) : ORIGIN = 0x18000000, LENGTH = 64K + ROM_RBL(rx) : ORIGIN = 0x18010000, LENGTH = 8K + ROM_TFM(rx) : ORIGIN = 0x18012000, LENGTH = 200K + ROM_RTOS(rx) : ORIGIN = 0x18044000, LENGTH = 2092K + /* + Reserved : LENGTH = 228 K, 152 K For TFM + Free For Customer : LENGTH = 500 K + */ + ROM_FOTA(r) : ORIGIN = 0x18305000, LENGTH = 3968K + ROM_NVDM(rx) : ORIGIN = 0x186E5000, LENGTH = 64K + ROM_LOG(rx) : ORIGIN = 0x186F5000, LENGTH = 64K + ROM_BT(rx) : ORIGIN = 0x18705000, LENGTH = 304K + /* + Reserved For FW : LENGTH = 40 K + */ + ROM_WIFI_PWRTBL(rx): ORIGIN = 0x1875B000, LENGTH = 20K + ROM_WIFI_EXT(rx) : ORIGIN = 0x18760000, LENGTH = 636K + ROM_BUFFER_BIN(rx): ORIGIN = 0x187FF000, LENGTH = 4K + + TCM(rwx) : ORIGIN = 0x0010C000, LENGTH = 20K + RAM_WFFW(rwx) : ORIGIN = 0xA0000000, LENGTH = 312K + RAM(rwx) : ORIGIN = 0xA004E000, LENGTH = 3272K + RAM_TFM(rwx) : ORIGIN = 0xA0380000, LENGTH = 512K + SYSRAM(rwx) : ORIGIN = 0x80000000, LENGTH = 992K + /* + Reserved : LENGTH = 32K + */ + + VROM(rx) : ORIGIN = 0x18000000, LENGTH = 4096K + VRAM_WFFW(rwx) : ORIGIN = 0x10000000, LENGTH = 312K + VRAM(rwx) : ORIGIN = 0x1004E000, LENGTH = 3272K + VRAM_TFM(rwx) : ORIGIN = 0x10380000, LENGTH = 512K + VSYSRAM(rwx) : ORIGIN = 0x08000000, LENGTH = 992K + /* + Reserved : LENGTH = 32K + */ +} + +/**************************************************************************** + * + * FORWARD DECLARATIONS - SECTION SYMBOLS @ FLASH PHYSICAL ADDRESS + * + ****************************************************************************/ + + +_rom_bl_start = ORIGIN(ROM_BL) - ORIGIN(ROM_BL); +_rom_bl_length = LENGTH(ROM_BL); +_rom_rbl_start = ORIGIN(ROM_RBL) - ORIGIN(ROM_BL); +_rom_rbl_length = LENGTH(ROM_RBL); +_rom_tfm_start = ORIGIN(ROM_TFM) - ORIGIN(ROM_BL); +_rom_tfm_length = LENGTH(ROM_TFM); +_rom_rtos_start = ORIGIN(ROM_RTOS) - ORIGIN(ROM_BL); +_rom_rtos_length = LENGTH(ROM_RTOS); +_rom_fota_start = ORIGIN(ROM_FOTA) - ORIGIN(ROM_BL); +_rom_fota_length = LENGTH(ROM_FOTA); +_rom_wifi_patch_start = 0;/*ORIGIN(ROM_WIFI_PATCH) - ORIGIN(ROM_BL);*/ +_rom_wifi_patch_length = 0;/*LENGTH(ROM_WIFI_PATCH);*/ +_rom_wifi_start = 0;/*ORIGIN(ROM_WIFI) - ORIGIN(ROM_BL);*/ +_rom_wifi_length = 0;/*LENGTH(ROM_WIFI);*/ +_rom_wifi_ext_start = ORIGIN(ROM_WIFI_EXT) - ORIGIN(ROM_BL); +_rom_wifi_ext_length = LENGTH(ROM_WIFI_EXT); +_rom_wifi_pwrtbl_start = ORIGIN(ROM_WIFI_PWRTBL) - ORIGIN(ROM_BL); +_rom_wifi_pwrtbl_length = LENGTH(ROM_WIFI_PWRTBL); +_rom_buffer_bin_start = ORIGIN(ROM_BUFFER_BIN) - ORIGIN(ROM_BL); +_rom_buffer_bin_length = LENGTH(ROM_BUFFER_BIN); +_rom_bt_start = ORIGIN(ROM_BT) - ORIGIN(ROM_BL); +_rom_bt_length = LENGTH(ROM_BT); +_rom_nvdm_start = ORIGIN(ROM_NVDM) - ORIGIN(ROM_BL); +_rom_nvdm_length = LENGTH(ROM_NVDM); +_rom_log_start = ORIGIN(ROM_LOG) - ORIGIN(ROM_BL); +_rom_log_length = LENGTH(ROM_LOG); + + +/**************************************************************************** + * + * FORWARD DECLARATIONS - SECTION SYMBOLS @ MEMORY BUS ADDRESS + * + ****************************************************************************/ + +_xip_bl_addr = ORIGIN(ROM_BL); +_xip_rbl_addr = ORIGIN(ROM_RBL); +_xip_tfm_addr = ORIGIN(ROM_TFM); +_xip_rtos_addr = ORIGIN(ROM_RTOS); +_xip_nvdm_start = ORIGIN(ROM_NVDM); +_xip_log_start = ORIGIN(ROM_LOG); +_xip_bt_start = ORIGIN(ROM_BT); + +_sysram_start = ORIGIN(SYSRAM); +_sysram_length = LENGTH(SYSRAM); +_ram_start = ORIGIN(RAM); +_ram_length = LENGTH(RAM); +_ram_wifi_ext_start = ORIGIN(RAM_WFFW); +_ram_wifi_ext_length = LENGTH(RAM_WFFW); +_vram_start = ORIGIN(VRAM); +_vram_length = LENGTH(VRAM); +_vsysram_start = ORIGIN(VSYSRAM); +_vsysram_length = LENGTH(VSYSRAM); +_tcm_start = ORIGIN(TCM); +_tcm_length = LENGTH(TCM); + + /* Highest address of the stack */ +_stack_end = ORIGIN(TCM) + LENGTH(TCM); /* end of TCM */ + +/* stack start */ +_stack_start = _stack_end - __STACK_SIZE; + +/* SYSRAM Region0 Offset for BROM */ +_region0_offset = 0x13000 ; + +SECTIONS +{ + . = ORIGIN(ROM_RTOS); + .text ALIGN(4): + { + _text_start = .; + KEEP(*(.vectorsTop)) + KEEP(*(.vectors)) + /* *(.text*) */ + *(EXCLUDE_FILE(*/iperf_task.o *sockets*.o *netbuf*.o *pbuf*.o */mem.o *api_lib*.o */def.o *api_msg*.o *sys_arch*.o *ip4*.o *ip4_addr*.o *udp*.o *inet_chksum*.o *tcp_out*.o *tcp*.o */netif.o */ethernet.o *etharp*.o */lwip_cli.o *portasm*.o *event_groups*.o */heap_ext.o */queue.o */tasks.o *list*.o *os_port_callback*.o */port.o *timers*.o *hal_nvic*.o *libc_nano*.a:*memset*.o *libc_nano*.a:*memcpy*.o *libminisupp.a:*mem*.o) .text*) + KEEP(*(.init)) + KEEP(*(.fini)) + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + *(.rodata*) + *(.rom_rtos) + KEEP(*(.eh_frame*)) + . = ALIGN(4); + _text_end = .; + } > ROM_RTOS AT> ROM_RTOS + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > ROM_RTOS AT> ROM_RTOS + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > ROM_RTOS AT> ROM_RTOS + __exidx_end = .; + + . = ALIGN(32); + _sysram_code_load = LOADADDR(.sysram_text); + .sysram_text ORIGIN(VSYSRAM)+_region0_offset : + { + _sysram_code_start = .; + *(.sysram_code) + *(.text*) + *(.sysram_rodata) + . = ALIGN(4); + _sysram_code_end = .; + } > VSYSRAM AT> ROM_RTOS + + . = ALIGN(4); + _sysram_data_load = LOADADDR(.cached_sysram_data); + .cached_sysram_data : + { + _sysram_data_start = .; + *(vtable) + *(.data) + *(.data.*) + *(.sysram_rwdata) + . = ALIGN(4); + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + . = ALIGN(4); + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + KEEP(*(.jcr*)) + . = ALIGN(4); + _sysram_data_end = .; + } > VSYSRAM AT> ROM_RTOS + + . = ALIGN(4); + .bss (NOLOAD) : + { + _sysram_bss_start = .; + *(.bss) + *(.bss.*) + *(COMMON) + *(.sysram_zidata) + *(.sysram_swla_zidata) + . = ALIGN(4); + _sysram_bss_end = .; + } > VSYSRAM AT> ROM_RTOS + + + . = ALIGN(32); + _noncached_sysram_code_load = LOADADDR(.noncached_sysram_text); + . = . + ORIGIN(SYSRAM) - ORIGIN(VSYSRAM); + .noncached_sysram_text . : + { + _noncached_sysram_code_start = .; + *(.noncached_sysram_code) + *(.noncached_sysram_rodata) + . = ALIGN(4); + _noncached_sysram_code_end = .; + } > SYSRAM AT> ROM_RTOS + + . = ALIGN(4); + _noncached_sysram_data_load = LOADADDR(.noncached_sysram_data); + .noncached_sysram_data . : + { + _noncached_sysram_data_start = .; + *(.noncached_sysram_rwdata) + *(.secure_settings_section) + . = ALIGN(4); + _noncached_sysram_data_end = .; + } > SYSRAM AT> ROM_RTOS + + . = ALIGN(4); + .noncached_sysram_bss . (NOLOAD) : + { + _noncached_sysram_bss_start = .; + *(.noncached_sysram_zidata) + . = ALIGN(4); + _noncached_sysram_bss_end = .; + } > SYSRAM AT> ROM_RTOS + + . = ALIGN(32); + .wffw_code (NOLOAD) : + { + *(.wf_firmware_emi_code) + . = ALIGN(4); + } > RAM_WFFW AT> ROM_RTOS + + . = ALIGN(32); + _ram_code_load = LOADADDR(.cached_ram_text); + .cached_ram_text : + { + _ram_code_start = .; + *(.ram_code) + *(.ram_rodata) + . = ALIGN(4); + _ram_code_end = .; + } > VRAM AT> ROM_RTOS + + . = ALIGN(4); + _ram_data_load = LOADADDR(.cached_ram_data); + .cached_ram_data : + { + _ram_data_start = .; + *(.ram_rwdata) + . = ALIGN(4); + _ram_data_end = .; + } > VRAM AT> ROM_RTOS + + . = ALIGN(4); + _ram_bss_load = LOADADDR(.cached_ram_bss); + .cached_ram_bss (NOLOAD) : + { + _ram_bss_start = .; + *(.ram_zidata) + . = ALIGN(4); + _ram_bss_end = .; + } > VRAM AT> ROM_RTOS + + . = ALIGN(32); + _noncached_ram_code_load = LOADADDR(.noncached_ram_text); + . = . + ORIGIN(RAM) - ORIGIN(VRAM); + .noncached_ram_text . : + { + _noncached_ram_code_start = .; + *(.noncached_ram_code) + *(.noncached_ram_rodata) + . = ALIGN(4); + _noncached_ram_code_end = .; + } > RAM AT> ROM_RTOS + + . = ALIGN(4); + _noncached_ram_data_load = LOADADDR(.noncached_ram_data); + .noncached_ram_data . : + { + _noncached_ram_data_start = .; + *(.noncached_ram_rwdata) + . = ALIGN(4); + _noncached_ram_data_end = .; + } > RAM AT> ROM_RTOS + + . = ALIGN(4); + _noncached_ram_bss_load = LOADADDR(.noncached_ram_bss); + .noncached_ram_bss . (NOLOAD) : + { + _noncached_ram_bss_start = .; + *(.noncached_ram_zidata) + . = ALIGN(4); + _noncached_ram_bss_end = .; + } > RAM AT> ROM_RTOS + + + . = ALIGN(4); + _tcm_code_load = LOADADDR(.tcm_text); + .tcm_text : + { + _tcm_code_start = .; + *(.tcm_code) + *(.tcm_rodata) + . = ALIGN(4); + _tcm_code_end = .; + }> TCM AT> ROM_RTOS + + . = ALIGN(4); + _tcm_data_load = LOADADDR(.tcm_data); + .tcm_data : + { + _tcm_data_start = .; + . = ALIGN(4); + *(.tcm_rwdata) + . = ALIGN(4); + _tcm_data_end = .; + }> TCM AT> ROM_RTOS + + . = ALIGN(4); + .tcm_bss (NOLOAD) : + { + _tcm_bss_start = .; + *(.tcm_zidata) + . = ALIGN(4); + *(.tcm_wakeup_info) + . = ALIGN(4); + _tcm_bss_end = .; + }> TCM AT> ROM_RTOS + + + __end__ = .; + + .mcuboot_tlv_rsvd (NOLOAD) : + { + /* reserve 512 bytes for imgtool.py TLVs */ + . = . + 512 ; + } > ROM_RTOS AT> ROM_RTOS + + .stack (ORIGIN(TCM) + LENGTH(TCM) - __STACK_SIZE) (COPY) : + { + . = ALIGN(4); + __StackLimit = .; + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + __STACK_SIZE; + . = ALIGN(4); + __StackTop = .; + } > TCM + + PROVIDE(__stack = __StackTop); + + ASSERT(__StackLimit >= __end__, "region TCM overflowed with stack") +} + + + diff --git a/examples/shell/genio/src/main.cpp b/examples/shell/genio/src/main.cpp new file mode 100644 index 00000000000000..5d8262a590e9f4 --- /dev/null +++ b/examples/shell/genio/src/main.cpp @@ -0,0 +1,182 @@ +/* + * + * 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. + */ + +#include +#include +#include +#include +#include +//#include + +#include + +#include + +#include + +#include "matter_shell.h" + +using chip::Shell::Engine; + +/*************************************************************************** + * FORWARD DECLARATIONS + ****************************************************************************/ + +extern "C" void system_init(void); + +void vStartTask(void * pvParameters); + +/*************************************************************************** + * FreeRTOS callback functions + ****************************************************************************/ + +#if (configUSE_DAEMON_TASK_STARTUP_HOOK == 1) + +extern "C" void vApplicationDaemonTaskStartupHook(void) +{ +#define START_TASK_STACK_SIZE (1000) + BaseType_t xReturned; + + xReturned = xTaskCreate(vStartTask, /* Function that implements the task. */ + "startTask", /* Text name for the task. */ + START_TASK_STACK_SIZE, /* Stack size in words, not bytes. */ + (void *) 0, /* Parameter passed into the task. */ + tskIDLE_PRIORITY, /* Priority at which the task is created. */ + NULL); /* Used to pass out the created task's handle. */ + + // configASSERT( xReturned == pdPASS ); +} + +#endif /* configUSE_DAEMON_TASK_STARTUP_HOOK */ + +#if (configUSE_IDLE_HOOK == 1) + +/* for idle task feed wdt (DO NOT enter sleep mode)*/ +extern "C" void vApplicationIdleHook(void) +{ +#ifdef MTK_SYSTEM_HANG_CHECK_ENABLE +#ifdef HAL_WDT_MODULE_ENABLED + hal_wdt_feed(HAL_WDT_FEED_MAGIC); +#endif +#endif +} + +#endif /* configUSE_IDLE_HOOK */ + +#if (configSUPPORT_STATIC_ALLOCATION == 1) + +extern "C" void vApplicationGetTimerTaskMemory(StaticTask_t ** ppxTimerTaskTCBBuffer, StackType_t ** ppxTimerTaskStackBuffer, + uint32_t * pulTimerTaskStackSize) +{ + *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH; + *ppxTimerTaskTCBBuffer = (StaticTask_t *) pvPortMalloc(sizeof(StaticTask_t)); + if (*ppxTimerTaskTCBBuffer != NULL) + { + *ppxTimerTaskStackBuffer = (StackType_t *) pvPortMalloc((((size_t) *pulTimerTaskStackSize) * sizeof(StackType_t))); + } +} + +extern "C" void vApplicationGetIdleTaskMemory(StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, + uint32_t * pulIdleTaskStackSize) +{ + *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE; + *ppxIdleTaskTCBBuffer = (StaticTask_t *) pvPortMalloc(sizeof(StaticTask_t)); + if (*ppxIdleTaskTCBBuffer != NULL) + { + *ppxIdleTaskStackBuffer = (StackType_t *) pvPortMalloc((((size_t) *pulIdleTaskStackSize) * sizeof(StackType_t))); + } +} + +#endif /* configSUPPORT_STATIC_ALLOCATION */ + +/******************************************************************************* + * DECLARATIONS + ******************************************************************************/ + +void mt793xLogRedirectCallback(const char * module, uint8_t category, const char * msg, va_list args) +{ + int len; + char * buf; + + len = strlen(module) + 1 + vsnprintf(NULL, 0, msg, args) + 1; + buf = (char *) malloc(len); + if (buf) + { + len = sprintf(buf, "%s ", module); + vsprintf(buf + len, msg, args); + printf("%s\n", buf); + free(buf); + } +} + +void mt793xSwdPortConfig(void) +{ + *(volatile uint32_t *) 0x30404358 = 0x00070700; + *(volatile uint32_t *) 0x30404354 = 0x00020200; + *(volatile uint32_t *) 0x304030e0 = 0x1e8210; + *(volatile uint32_t *) 0x304030d4 = 0; +} + +/*************************************************************************** + * Startup task + ****************************************************************************/ + +void vStartRunning(void) +{ + chip::Logging::SetLogRedirectCallback(mt793xLogRedirectCallback); + + assert(chip::Platform::MemoryInit() == CHIP_NO_ERROR); + + assert(chip::DeviceLayer::PlatformMgr().InitChipStack() == CHIP_NO_ERROR); + + assert(chip::DeviceLayer::PlatformMgr().StartEventLoopTask() == CHIP_NO_ERROR); + + chip::startShellTask(); +} + +void vStartTask(void * pvParameters) +{ + (void) pvParameters; + + vStartRunning(); + + vTaskDelete(NULL); +} + +/*************************************************************************** + * Main Function + ****************************************************************************/ + +extern "C" int main(void) +{ + mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); + +#ifdef HEAP_MONITORING + MemMonitoring::startHeapMonitoring(); +#endif + + system_init(); + + mt793xSwdPortConfig(); + + vTaskStartScheduler(); + + for (;;) + ; + + return -1; +} diff --git a/examples/shell/genio/third_party/connectedhomeip b/examples/shell/genio/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/shell/genio/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/scripts/build/BUILD.gn b/scripts/build/BUILD.gn index a8537950b69604..706dcaed32a433 100644 --- a/scripts/build/BUILD.gn +++ b/scripts/build/BUILD.gn @@ -39,6 +39,7 @@ pw_python_package("build_examples") { "builders/builder.py", "builders/efr32.py", "builders/esp32.py", + "builders/genio.py", "builders/gn.py", "builders/host.py", "builders/imx.py", diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 74a4967f828afa..ac0ad46642098b 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -34,6 +34,7 @@ from builders.bl602 import Bl602App, Bl602Board, Bl602Builder from builders.bouffalolab import BouffalolabApp, BouffalolabBoard, BouffalolabBuilder from builders.imx import IMXApp, IMXBuilder +from builders.genio import GenioApp, GenioBuilder class Target: @@ -649,6 +650,12 @@ def MW320Targets(): yield target.Extend('all-clusters-app', app=MW320App.ALL_CLUSTERS) +def GenioTargets(): + target = Target('genio', GenioBuilder) + + yield target.Extend('lighting-app', app=GenioApp.LIGHT) + + ALL = [] target_generators = [ @@ -669,6 +676,7 @@ def MW320Targets(): BouffalolabTargets(), IMXTargets(), MW320Targets(), + GenioTargets(), ] for generator in target_generators: diff --git a/scripts/build/builders/genio.py b/scripts/build/builders/genio.py new file mode 100755 index 00000000000000..2262cfad26f19c --- /dev/null +++ b/scripts/build/builders/genio.py @@ -0,0 +1,57 @@ +import os + +from enum import Enum, auto + +from .gn import GnBuilder + + +class GenioApp(Enum): + LIGHT = auto() + SHELL = auto() + + def ExampleName(self): + if self == GenioApp.LIGHT: + return 'lighting-app' + elif self == GenioApp.SHELL: + return 'shell' + else: + raise Exception('Unknown app type: %r' % self) + + def AppNamePrefix(self): + if self == GenioApp.LIGHT: + return 'chip-genio-lighting-app-example' + elif self == GenioApp.SHELL: + return 'chip-genio-shell-example' + else: + raise Exception('Unknown app type: %r' % self) + + def FlashBundleName(self): + if self == GenioApp.LIGHT: + return 'lighting_app.flashbundle.txt' + elif self == GEnioApp.SHELL: + return 'shell.flashbundle.txt' + else: + raise Exception('Unknown app type: %r' % self) + + def BuildRoot(self, root): + return os.path.join(root, 'examples', self.ExampleName(), 'genio') + + +class GenioBuilder(GnBuilder): + + def __init__(self, + root, + runner, + app: GenioApp = GenioApp.LIGHT): + super(GenioBuilder, self).__init__( + root=app.BuildRoot(root), + runner=runner) + self.app = app + + def build_outputs(self): + items = {} + for extension in ['out', 'out.map', 'bin']: + name = '%s.%s' % (self.app.AppNamePrefix(), extension) + items[name] = os.path.join(self.output_dir, name) + + return items diff --git a/scripts/build/testdata/all_targets_except_host.txt b/scripts/build/testdata/all_targets_except_host.txt index 90c864b912a5f0..1252a0dae7f059 100644 --- a/scripts/build/testdata/all_targets_except_host.txt +++ b/scripts/build/testdata/all_targets_except_host.txt @@ -172,6 +172,7 @@ esp32-m5stack-all-clusters-rpc-ipv6only esp32-m5stack-ota-requestor esp32-m5stack-ota-requestor-rpc esp32-qemu-tests +genio-lighting-app imx-all-clusters-app imx-all-clusters-app-release imx-all-clusters-minimal-app diff --git a/scripts/build/testdata/build_all_except_host.txt b/scripts/build/testdata/build_all_except_host.txt index e34407ef81bddd..efacf03b4af51c 100644 --- a/scripts/build/testdata/build_all_except_host.txt +++ b/scripts/build/testdata/build_all_except_host.txt @@ -833,6 +833,9 @@ bash -c 'source $IDF_PATH/export.sh; source scripts/activate.sh; export SDKCONFIG_DEFAULTS={out}/esp32-qemu-tests/sdkconfig.defaults idf.py -C src/test_driver/esp32 -B {out}/esp32-qemu-tests reconfigure' +# Generating genio-lighting-app +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/genio {out}/genio-lighting-app + # Generating imx-all-clusters-app gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '--args=treat_warnings_as_errors=false target_os="linux" target_cpu="arm64" arm_arch="armv8-a" import("//build_overrides/build.gni") custom_toolchain="${build_root}/toolchain/custom" sysroot="IMX_SDK_ROOT/sysroots/cortexa53-crypto-poky-linux" target_cflags=[ "-DCHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME=\"mlan0\"", "-DCHIP_DEVICE_CONFIG_LINUX_DHCPC_CMD=\"udhcpc -b -i %s \"" ] target_cc="IMX_SDK_ROOT/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc" target_cxx="IMX_SDK_ROOT/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++" target_ar="IMX_SDK_ROOT/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ar" optimize_debug=true' {out}/imx-all-clusters-app @@ -2122,6 +2125,9 @@ bash -c 'source $IDF_PATH/export.sh; source scripts/activate.sh; export SDKCONFIG_DEFAULTS={out}/esp32-qemu-tests/sdkconfig.defaults idf.py -C src/test_driver/esp32 -B {out}/esp32-qemu-tests build' +# Building genio-lighting-app +ninja -C {out}/genio-lighting-app + # Building imx-all-clusters-app ninja -C {out}/imx-all-clusters-app diff --git a/scripts/build/testdata/glob_star_targets_except_host.txt b/scripts/build/testdata/glob_star_targets_except_host.txt index 95539cd8bc00fc..04111a9ba7b770 100644 --- a/scripts/build/testdata/glob_star_targets_except_host.txt +++ b/scripts/build/testdata/glob_star_targets_except_host.txt @@ -66,6 +66,7 @@ esp32-m5stack-all-clusters-rpc-ipv6only esp32-m5stack-ota-requestor esp32-m5stack-ota-requestor-rpc esp32-qemu-tests +genio-lighting-app imx-all-clusters-app imx-all-clusters-app-release imx-all-clusters-minimal-app diff --git a/scripts/build_python_device.sh b/scripts/build_python_device.sh index 30779c6ab2f02c..894ea1bad61c8b 100755 --- a/scripts/build_python_device.sh +++ b/scripts/build_python_device.sh @@ -104,7 +104,7 @@ gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="chip_detail_logging=$chip_deta if [ "$enable_pybindings" == true ]; then ninja -v -C "$OUTPUT_ROOT" pycontroller else - ninja -v -C "$OUTPUT_ROOT" chip-library + ninja -v -C "$OUTPUT_ROOT" chip-core fi # Create a virtual environment that has access to the built python tools @@ -115,7 +115,7 @@ virtualenv --clear "$ENVIRONMENT_ROOT" if [ "$enable_pybindings" == true ]; then WHEEL=("$OUTPUT_ROOT"/pybindings/pycontroller/pychip-*.whl) else - WHEEL=("$OUTPUT_ROOT"/controller/python/chip_library*.whl) + WHEEL=("$OUTPUT_ROOT"/controller/python/chip_core*.whl) fi source "$ENVIRONMENT_ROOT"/bin/activate diff --git a/scripts/checkout_submodules.py b/scripts/checkout_submodules.py index 97d881f586a615..55170d661b4c66 100755 --- a/scripts/checkout_submodules.py +++ b/scripts/checkout_submodules.py @@ -46,6 +46,7 @@ 'tizen', 'webos', 'mw320', + 'genio', ]) Module = namedtuple('Module', 'name path platforms') diff --git a/scripts/constraints.txt b/scripts/constraints.txt index b587f1998650ef..f29bbc7d5a4337 100644 --- a/scripts/constraints.txt +++ b/scripts/constraints.txt @@ -63,7 +63,7 @@ cryptography==3.4.7 # -r requirements.txt cxxfilt==0.2.2 # via -r requirements.txt -dbus-python==1.2.16 ; sys_platform == "linux" +dbus-python==1.2.18 ; sys_platform == "linux" # via -r requirements.txt decorator==5.0.9 # via ipython diff --git a/scripts/requirements.txt b/scripts/requirements.txt index a006725dc5e10d..e33963c48c2a42 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -16,7 +16,7 @@ requests>=2.24.0 # device controller wheel package wheel -dbus-python; sys_platform == 'linux' +dbus-python==1.2.18; sys_platform == 'linux' pgi; sys_platform == 'linux' pyobjc-core; sys_platform == 'darwin' pyobjc-framework-cocoa; sys_platform == 'darwin' @@ -65,4 +65,4 @@ cryptography colorama # update tornado for pw_watch -tornado \ No newline at end of file +tornado diff --git a/scripts/tests/chiptest/lsan-mac-suppressions.txt b/scripts/tests/chiptest/lsan-mac-suppressions.txt index 0ff9c0e4ee2acd..8d1bd5719713ee 100644 --- a/scripts/tests/chiptest/lsan-mac-suppressions.txt +++ b/scripts/tests/chiptest/lsan-mac-suppressions.txt @@ -19,16 +19,28 @@ leak:drbg_bytes # TODO: OpenSSL ERR_get_state seems to leak. leak:ERR_get_state -# TODO: BLE initialization allocates some UUIDs and strings that seem to leak. -leak:[BleConnection initWithDiscriminator:] -leak:[CBXpcConnection initWithDelegate:queue:options:sessionType:] - -# TODO: Figure out how we are managing to leak NSData while using ARC! -leak:[CHIPToolKeypair signMessageECDSA_RAW:] - -# TODO: Figure out how we are managing to leak NSData while using ARC, though -# this may just be a leak deep inside the CFPreferences stuff somewhere. -leak:[CHIPToolPersistentStorageDelegate storageDataForKey:] - # TODO: https://github.com/project-chip/connectedhomeip/issues/22333 -leak:[MTRBaseCluster* subscribeAttribute*WithMinInterval:maxInterval:params:subscriptionEstablished:reportHandler:] +leak:[MTRBaseCluster* subscribeAttribute*WithParams:subscriptionEstablished:reportHandler:] + +#TODO: Figure out why nw_path_monitor_create leaks. The leak can be reproduced using: +# -- testFile.cpp +# +##include +# +#int main(int argc, char **argv) { +# auto monitor = nw_path_monitor_create(); +# nw_release(monitor); +# return 0; +#} +# +# -- testFile.mm (with -fobj-arc) +##include +# +#int main(int argc, char **argv) { +# __auto_type monitor = nw_path_monitor_create(); +# return 0; +#} +leak:nw_path_monitor_create + +# TODO: See the previous comment about nw_path_monitor_create, since it also applies to nw_path_monitor_start +leak:nw_path_monitor_start diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index 7865c87c71d0a3..014dec90fc7492 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -455,6 +455,61 @@ uint32_t ContentAppPlatform::GetPincodeFromContentApp(uint16_t vendorId, uint16_ return (uint32_t) strtol(pinString.c_str(), &eptr, 10); } +// Returns ACL entry with match subject or CHIP_ERROR_NOT_FOUND if no match is found +CHIP_ERROR ContentAppPlatform::GetACLEntryIndex(size_t * foundIndex, FabricIndex fabricIndex, NodeId subjectNodeId) +{ + size_t index = 0; + if (Access::GetAccessControl().GetEntryCount(fabricIndex, index) == CHIP_NO_ERROR) + { + while (index) + { + Access::AccessControl::Entry entry; + CHIP_ERROR err = Access::GetAccessControl().ReadEntry(fabricIndex, --index, entry); + if (err != CHIP_NO_ERROR) + { + ChipLogDetail(DeviceLayer, "ContentAppPlatform::GetACLEntryIndex error reading entry %d err %s", + static_cast(index), ErrorStr(err)); + } + else + { + size_t count; + err = entry.GetSubjectCount(count); + if (err != CHIP_NO_ERROR) + { + ChipLogDetail(DeviceLayer, + "ContentAppPlatform::GetACLEntryIndex error reading subject count for entry %d err %s", + static_cast(index), ErrorStr(err)); + continue; + } + if (count) + { + ChipLogDetail(DeviceLayer, "subjects: %u", static_cast(count)); + for (size_t i = 0; i < count; ++i) + { + NodeId subject; + err = entry.GetSubject(i, subject); + if (err != CHIP_NO_ERROR) + { + ChipLogDetail(DeviceLayer, + "ContentAppPlatform::GetACLEntryIndex error reading subject %i for entry %d err %s", + static_cast(i), static_cast(index), ErrorStr(err)); + continue; + } + if (subject == subjectNodeId) + { + ChipLogDetail(DeviceLayer, "ContentAppPlatform::GetACLEntryIndex found matching subject at index %d", + static_cast(index)); + *foundIndex = index; + return CHIP_NO_ERROR; + } + } + } + } + } + } + return CHIP_ERROR_NOT_FOUND; +} + constexpr EndpointId kTargetBindingClusterEndpointId = 0; constexpr EndpointId kLocalVideoPlayerEndpointId = 1; constexpr EndpointId kLocalSpeakerEndpointId = 2; @@ -472,6 +527,8 @@ constexpr ClusterId kClusterIdAudioOutput = 0x050b; // constexpr ClusterId kClusterIdApplicationLauncher = 0x050c; // constexpr ClusterId kClusterIdAccountLogin = 0x050e; +// Add ACLs on this device for the given client, +// and create bindings on the given client so that it knows what it has access to. CHIP_ERROR ContentAppPlatform::ManageClientAccess(Messaging::ExchangeManager & exchangeMgr, SessionHandle & sessionHandle, uint16_t targetVendorId, NodeId localNodeId, Controller::WriteResponseSuccessCallback successCb, @@ -482,12 +539,30 @@ CHIP_ERROR ContentAppPlatform::ManageClientAccess(Messaging::ExchangeManager & e Access::Privilege vendorPrivilege = mContentAppFactory->GetVendorPrivilege(targetVendorId); + NodeId subjectNodeId = sessionHandle->GetPeer().GetNodeId(); + FabricIndex fabricIndex = sessionHandle->GetFabricIndex(); + + // first, delete existing ACLs for this nodeId + { + size_t index; + CHIP_ERROR err; + while (CHIP_NO_ERROR == (err = GetACLEntryIndex(&index, fabricIndex, subjectNodeId))) + { + err = Access::GetAccessControl().DeleteEntry(nullptr, fabricIndex, index); + if (err != CHIP_NO_ERROR) + { + ChipLogDetail(DeviceLayer, "ContentAppPlatform::ManageClientAccess error entry %d err %s", static_cast(index), + ErrorStr(err)); + } + } + } + Access::AccessControl::Entry entry; ReturnErrorOnFailure(GetAccessControl().PrepareEntry(entry)); ReturnErrorOnFailure(entry.SetAuthMode(Access::AuthMode::kCase)); - entry.SetFabricIndex(sessionHandle->GetFabricIndex()); + entry.SetFabricIndex(fabricIndex); ReturnErrorOnFailure(entry.SetPrivilege(vendorPrivilege)); - ReturnErrorOnFailure(entry.AddSubject(nullptr, sessionHandle->GetPeer().GetNodeId())); + ReturnErrorOnFailure(entry.AddSubject(nullptr, subjectNodeId)); std::vector bindings; @@ -502,6 +577,13 @@ CHIP_ERROR ContentAppPlatform::ManageClientAccess(Messaging::ExchangeManager & e * We could have organized things differently, for example, * - a single ACL for (a) and (b) which is shared by many subjects * - a single ACL entry per subject for (c) + * + * We are also creating the following set of bindings on the remote device: + * a) Video Player endpoint + * b) Speaker endpoint + * c) selection of content app endpoints (0 to many) + * The purpose of the bindings is to inform the client of its access to + * nodeId and endpoints on the app platform. */ ChipLogProgress(Controller, "Create video player endpoint ACL and binding"); diff --git a/src/app/app-platform/ContentAppPlatform.h b/src/app/app-platform/ContentAppPlatform.h index 3a39365e95c754..3744a0fa0edf1d 100644 --- a/src/app/app-platform/ContentAppPlatform.h +++ b/src/app/app-platform/ContentAppPlatform.h @@ -138,6 +138,11 @@ class DLL_EXPORT ContentAppPlatform * Add ACLs on this device for the given client, * and create bindings on the given client so that it knows what it has access to. * + * The default implementation follows the device library Video Player Architecture spec + * for a typical video player given assumptions like video player endpoint id is 1 and + * speaker endpoint id is 2. Some devices may need to override this implementation when + * these assumptions are not correct. + * * @param[in] exchangeMgr Exchange manager to be used to get an exchange context. * @param[in] sessionHandle Reference to an established session. * @param[in] targetVendorId Vendor ID for the target device. @@ -155,6 +160,7 @@ class DLL_EXPORT ContentAppPlatform // requires vendorApp to be in the catalog of the platform ContentApp * LoadContentAppInternal(const CatalogVendorApp & vendorApp); ContentApp * GetContentAppInternal(const CatalogVendorApp & vendorApp); + CHIP_ERROR GetACLEntryIndex(size_t * foundIndex, FabricIndex fabricIndex, NodeId subjectNodeId); static const int kNoCurrentEndpointId = 0; EndpointId mCurrentAppEndpointId = kNoCurrentEndpointId; diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index baf6a97877df81..1c384c378f9151 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -328,9 +328,6 @@ void OnPlatformEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, in } // anonymous namespace -// As per specifications section 11.22.5.1. Constant RESP_MAX -constexpr size_t kMaxRspLen = 900; - class OpCredsFabricTableDelegate : public chip::FabricTable::Delegate { public: @@ -848,7 +845,7 @@ bool emberAfOperationalCredentialsClusterUpdateNOCCallback(app::CommandHandler * else { commandObj->AddStatus(commandPath, nonDefaultStatus); - ChipLogError(Zcl, "OpCreds: Failed AddNOC request with IM error 0x%02x", to_underlying(nonDefaultStatus)); + ChipLogError(Zcl, "OpCreds: Failed UpdateNOC request with IM error 0x%02x", to_underlying(nonDefaultStatus)); } return true; @@ -961,7 +958,7 @@ bool emberAfOperationalCredentialsClusterAttestationRequestCallback(app::Command attestationElementsSpan = MutableByteSpan{ attestationElements.Get(), attestationElementsLen }; err = Credentials::ConstructAttestationElements(certDeclSpan, attestationNonce, timestamp, kEmptyFirmwareInfo, emptyVendorReserved, attestationElementsSpan); - VerifyOrExit((err == CHIP_NO_ERROR) && (attestationElementsSpan.size() <= kMaxRspLen), finalStatus = Status::Failure); + VerifyOrExit(err == CHIP_NO_ERROR, finalStatus = Status::Failure); // Append attestation challenge in the back of the reserved space for the signature memcpy(attestationElements.Get() + attestationElementsSpan.size(), attestationChallenge.data(), attestationChallenge.size()); @@ -1092,7 +1089,7 @@ bool emberAfOperationalCredentialsClusterCSRRequestCallback(app::CommandHandler err = Credentials::ConstructNOCSRElements(ByteSpan{ csrSpan.data(), csrSpan.size() }, CSRNonce, kNoVendorReserved, kNoVendorReserved, kNoVendorReserved, nocsrElementsSpan); - VerifyOrExit((err == CHIP_NO_ERROR) && (nocsrElementsSpan.size() <= kMaxRspLen), finalStatus = Status::Failure); + VerifyOrExit(err == CHIP_NO_ERROR, finalStatus = Status::Failure); // Append attestation challenge in the back of the reserved space for the signature memcpy(nocsrElements.Get() + nocsrElementsSpan.size(), attestationChallenge.data(), attestationChallenge.size()); diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index aa8468a435fe18..575080f2c546b3 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -466,74 +466,74 @@ PICS: id: CC.C.A003c - label: "Does the device implement receiving the MoveToHue command?" - id: CC.C.C00.Rsp + id: CC.C.C00.Tx - label: "Does the device implement receiving the MoveHue command?" - id: CC.C.C01.Rsp + id: CC.C.C01.Tx - label: "Does the device implement receiving the MoveToHue command?" - id: CC.C.C02.Rsp + id: CC.C.C02.Tx - label: "Does the device implement receiving the MoveToSaturation command?" - id: CC.C.C03.Rsp + id: CC.C.C03.Tx - label: "Does the device implement receiving the MoveSaturation command?" - id: CC.C.C04.Rsp + id: CC.C.C04.Tx - label: "Does the device implement receiving the StepSaturation command?" - id: CC.C.C05.Rsp + id: CC.C.C05.Tx - label: "Does the device implement receiving the MoveToHueAndSaturation command?" - id: CC.C.C06.Rsp + id: CC.C.C06.Tx - label: "Does the device implement receiving the MoveToColor command?" - id: CC.C.C07.Rsp + id: CC.C.C07.Tx - label: "Does the device implement receiving the MoveColor command?" - id: CC.C.C08.Rsp + id: CC.C.C08.Tx - label: "Does the device implement receiving the StopMoveStep command?" - id: CC.C.C47.Rsp + id: CC.C.C47.Tx - label: "Does the device implement receiving the StepColor command?" - id: CC.C.C09.Rsp + id: CC.C.C09.Tx - label: "Does the device implement receiving the MoveToColorTemperature command?" - id: CC.C.C0a.Rsp + id: CC.C.C0a.Tx - label: "Does the device implement receiving the MoveColorTemperature command?" - id: CC.C.C4b.Rsp + id: CC.C.C4b.Tx - label: "Does the device implement receiving the StepColorTemperature command?" - id: CC.C.C4c.Rsp + id: CC.C.C4c.Tx - label: "Does the device implement receiving the EnhancedMoveToHue command?" - id: CC.C.C40.Rsp + id: CC.C.C40.Tx - label: "Does the device implement receiving the EnhancedMoveHue command?" - id: CC.C.C41.Rsp + id: CC.C.C41.Tx - label: "Does the device implement receiving the EnhancedStepHue command?" - id: CC.C.C42.Rsp + id: CC.C.C42.Tx - label: "Does the device implement receiving the EnhancedMoveToHueAndSaturation command?" - id: CC.C.C43.Rsp + id: CC.C.C43.Tx - label: "Does the device implement receiving the ColorLoopSet command?" - id: CC.C.C44.Rsp + id: CC.C.C44.Tx - label: "Does the device implement sending the MoveToColorTemperature command?" - id: CC.C.C0a.Rsp + id: CC.C.C0a.Tx # Relative Humidity cluster - label: "Does the device implement the MeasuredValue attribute?" diff --git a/src/app/tests/suites/certification/Test_TC_ACE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACE_1_1.yaml index 5b7211b67cd717..17ca29b62ddc3c 100644 --- a/src/app/tests/suites/certification/Test_TC_ACE_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACE_1_1.yaml @@ -44,7 +44,7 @@ tests: AuthMode field: CASE (2) Subjects field: [N1] Targets field: [{Endpoint: 0}]" verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": null, "endpoint": 0, "deviceType": null }]}]' 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": null, "endpoint": 0, "deviceType": null }]}]" 1 0 On TH(Chiptool),Verify ACL attribute with a list of AccessControlEntryStruct entries containing 1 element. [1659419235.790198][3332:3337] CHIP:DMG: WriteClient moving to [ResponseRe] [1659419235.790263][3332:3337] CHIP:DMG: WriteResponseMessage = @@ -317,7 +317,7 @@ tests: 0}] 2.struct Privilege field: Manage (4) AuthMode field: CASE (2) Subjects field: [N1] Targets field: [{Endpoint: 0}]" verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": 31, "endpoint": 0, "deviceType": null }]},{ "privilege": 4, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": null, "endpoint": 0, "deviceType": null }]}]' 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": 31, "endpoint": 0, "deviceType": null }]},{ "privilege": 4, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": null, "endpoint": 0, "deviceType": null }]}]" 1 0 On TH(Chiptool),Verify ACL attribute with a list of AccessControlEntryStruct entries containing 2 elements 1660288528.919407][3487:3493] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -614,7 +614,7 @@ tests: 0}] 2. struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: [N1] Targets field: [{Endpoint: 0}]" verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": 31, "endpoint": 0, "deviceType": null }]},{ "privilege": 3, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": null, "endpoint": 0, "deviceType": null }]}]' 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": 31, "endpoint": 0, "deviceType": null }]},{ "privilege": 3, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": null, "endpoint": 0, "deviceType": null }]}]" 1 0 On TH(Chiptool),Verify ACL attribute with a list of AccessControlEntryStruct entries containing 2 elements 1660289539.245027][3576:3581] CHIP:DMG: WriteResponseMessage = @@ -823,7 +823,7 @@ tests: cluster with the EnableKey set to 0 and the EventTrigger set to 0. (requires manage privilege)" verification: | - ./chip-tool basic write node-label TestNode 1 0 + ./chip-tool generaldiagnostics test-event-trigger 0 0 1 0 On TH(Chiptool),Verify TestEventTrigger command to the General Diagnostics cluster with the EnableKey set to 0 and the EventTrigger set to 0. (requires manage privilege) Returns UNSUPPORTED_ACCESS (0x7e) [1660290186.783158][3633:3638] CHIP:DMG: InvokeResponseMessage = @@ -905,7 +905,7 @@ tests: 2.struct Privilege field: View (1) AuthMode field: CASE (2) Subjects field: [N1] Targets field: [{Endpoint: 0}]" verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": 31, "endpoint": 0, "deviceType": null }]},{ "privilege": 1, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": null, "endpoint": 0, "deviceType": null }]}]' 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": 31, "endpoint": 0, "deviceType": null }]},{ "privilege": 1, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": null, "endpoint": 0, "deviceType": null }]}]" 1 0 On TH(Chiptool),Verify ACL attribute with a list of AccessControlEntryStruct entries containing 2 elements @@ -1186,7 +1186,7 @@ tests: verification: | On TH(Chiptool)1,Verify ACL attribute with a list of AccessControlEntryStruct entries containing 1 element. - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": 31, "endpoint": 0, "deviceType": null }]}]' 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{ "cluster": 31, "endpoint": 0, "deviceType": null }]}]" 1 0 60291527.086023][3753:3758] CHIP:DMG: Cluster = 0x1f, [1660291527.086060][3753:3758] CHIP:DMG: Attribute = 0x0000_0000, diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml index e5b34505a45c87..ee68e0c2b5de21 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml @@ -72,7 +72,7 @@ tests: - label: "TH1 commissions DUT using admin node ID N1" verification: | DUT - sudo ./chip-all-clusters-app + sudo ./chip-all-clusters-app --wifi TH1 ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841 @@ -584,7 +584,7 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element - 1.struct Data field: D_BAD_NOnE" + 1.struct Data field: D_BAD_NONE" PICS: ACL.S.A0001 verification: | ./chip-tool accesscontrol write extension '[{"data":""}]' 1 0 diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml index 0a2c47504da02f..417801e174809b 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml @@ -929,7 +929,7 @@ tests: verification: | ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 2, "authMode": 2, "subjects": null, "targets": null}]' 1 0 - On TH1(Chiptool), Verify that the status is Success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null + On TH1(Chiptool), Verify that the status is Success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null [1656507439.868495][3249:3254] CHIP:DMG: WriteClient moving to [ResponseRe] [1656507439.868612][3249:3254] CHIP:DMG: WriteResponseMessage = [1656507439.868671][3249:3254] CHIP:DMG: { @@ -1053,7 +1053,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects":[33,44,55,66] , "targets": null}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject as SUBJECTS and Target as null + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject as SUBJECTS and Target as null @@ -1164,7 +1164,7 @@ tests: verification: | ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects":[65520,65521,65522,65523] , "targets": null}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Subjects as CAT Values and Target as null + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Subjects as CAT Values and Target as null [1656509348.174135][3403:3408] CHIP:DMG: WriteClient moving to [ResponseRe] [1656509348.174227][3403:3408] CHIP:DMG: WriteResponseMessage = [1656509348.174272][3403:3408] CHIP:DMG: { @@ -1285,13 +1285,14 @@ tests: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: null Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: CASE (2) Subjects field: Targets field: list of + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) + AuthMode field: CASE (2) Subjects field:null Targets field: list of MAXTARGETS targets {Cluster: random} (stored as TARGETS)" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": null, "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 40, "endpoint": null, "deviceType": null },{ "cluster": 28, "endpoint": null, "deviceType": null }]}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Subjects as null and and Target as TARGETS + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 40, "endpoint": null, "deviceType": null },{ "cluster": 28, "endpoint": null, "deviceType": null }]}]' 1 0 + + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Subjects as null and and Target as TARGETS [1657542520.140869][3499:3504] CHIP:DMG: { [1657542520.140922][3499:3504] CHIP:DMG: AttributeStatusIBs = @@ -1321,36 +1322,50 @@ tests: [1657542520.141940][3499:3504] CHIP:DMG: Attribute = 0x0000_0000, [1657542520.142024][3499:3504] CHIP:DMG: ListIndex = Null, [1657542520.142106][3499:3504] CHIP:DMG: } - [1657542520.142187][3499:3504] CHIP:DMG: - [1657542520.142257][3499:3504] CHIP:DMG: StatusIB = - [1657542520.142336][3499:3504] CHIP:DMG: { - [1657542520.142414][3499:3504] CHIP:DMG: status = 0x00 (SUCCESS), - [1657542520.142497][3499:3504] CHIP:DMG: }, - [1657542520.142572][3499:3504] CHIP:DMG: - [1657542520.142633][3499:3504] CHIP:DMG: }, - [1657542520.142719][3499:3504] CHIP:DMG: - [1657542520.142778][3499:3504] CHIP:DMG: AttributeStatusIB = - [1657542520.142841][3499:3504] CHIP:DMG: { - [1657542520.142903][3499:3504] CHIP:DMG: AttributePathIB = - [1657542520.142976][3499:3504] CHIP:DMG: { - [1657542520.143053][3499:3504] CHIP:DMG: Endpoint = 0x0, - [1657542520.143134][3499:3504] CHIP:DMG: Cluster = 0x1f, - [1657542520.143223][3499:3504] CHIP:DMG: Attribute = 0x0000_0000, - [1657542520.143300][3499:3504] CHIP:DMG: ListIndex = Null, - [1657542520.143382][3499:3504] CHIP:DMG: } - [1657542520.143463][3499:3504] CHIP:DMG: - [1657542520.143536][3499:3504] CHIP:DMG: StatusIB = - [1657542520.143608][3499:3504] CHIP:DMG: { - [1657542520.143683][3499:3504] CHIP:DMG: status = 0x00 (SUCCESS), - [1657542520.143764][3499:3504] CHIP:DMG: }, - [1657542520.143837][3499:3504] CHIP:DMG: - [1657542520.143902][3499:3504] CHIP:DMG: }, - [1657542520.143973][3499:3504] CHIP:DMG: - [1657542520.144030][3499:3504] CHIP:DMG: ], - [1657542520.144117][3499:3504] CHIP:DMG: - [1657542520.144175][3499:3504] CHIP:DMG: InteractionModelRevision = 1 - [1657542520.144233][3499:3504] CHIP:DMG: } - [1657542520.144531][3499:3504] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1662015973.912273][3126:3132] CHIP:DMG: { + [1662015973.912301][3126:3132] CHIP:DMG: AttributeStatusIBs = + [1662015973.912375][3126:3132] CHIP:DMG: [ + [1662015973.912409][3126:3132] CHIP:DMG: AttributeStatusIB = + [1662015973.912452][3126:3132] CHIP:DMG: { + [1662015973.912488][3126:3132] CHIP:DMG: AttributePathIB = + [1662015973.912534][3126:3132] CHIP:DMG: { + [1662015973.912577][3126:3132] CHIP:DMG: Endpoint = 0x0, + [1662015973.912640][3126:3132] CHIP:DMG: Cluster = 0x1f, + [1662015973.912687][3126:3132] CHIP:DMG: Attribute = 0x0000_0000, + [1662015973.912743][3126:3132] CHIP:DMG: } + [1662015973.912792][3126:3132] CHIP:DMG: + [1662015973.912849][3126:3132] CHIP:DMG: StatusIB = + [1662015973.912893][3126:3132] CHIP:DMG: { + [1662015973.912948][3126:3132] CHIP:DMG: status = 0x00 (SUCCESS), + [1662015973.912992][3126:3132] CHIP:DMG: }, + [1662015973.913046][3126:3132] CHIP:DMG: + [1662015973.913082][3126:3132] CHIP:DMG: }, + [1662015973.913142][3126:3132] CHIP:DMG: + [1662015973.913173][3126:3132] CHIP:DMG: AttributeStatusIB = + [1662015973.913225][3126:3132] CHIP:DMG: { + [1662015973.913260][3126:3132] CHIP:DMG: AttributePathIB = + [1662015973.913315][3126:3132] CHIP:DMG: { + [1662015973.913360][3126:3132] CHIP:DMG: Endpoint = 0x0, + [1662015973.913421][3126:3132] CHIP:DMG: Cluster = 0x1f, + [1662015973.913465][3126:3132] CHIP:DMG: Attribute = 0x0000_0000, + [1662015973.913518][3126:3132] CHIP:DMG: ListIndex = Null, + [1662015973.913561][3126:3132] CHIP:DMG: } + [1662015973.913622][3126:3132] CHIP:DMG: + [1662015973.913662][3126:3132] CHIP:DMG: StatusIB = + [1662015973.913716][3126:3132] CHIP:DMG: { + [1662015973.913759][3126:3132] CHIP:DMG: status = 0x00 (SUCCESS), + [1662015973.913814][3126:3132] CHIP:DMG: }, + [1662015973.913855][3126:3132] CHIP:DMG: + [1662015973.913902][3126:3132] CHIP:DMG: }, + [1662015973.913952][3126:3132] CHIP:DMG: + [1662015973.913983][3126:3132] CHIP:DMG: AttributeStatusIB = + [1662015973.914021][3126:3132] CHIP:DMG: { + [1662015973.914056][3126:3132] CHIP:DMG: AttributePathIB = + [1662015973.914095][3126:3132] CHIP:DMG: { + [1662015973.914139][3126:3132] CHIP:DMG: Endpoint = 0x0, + [1662015973.914183][3126:3132] CHIP:DMG: Cluster = 0x1f, + [1662015973.914228][3126:3132] CHIP:DMG: Attribute = 0x0000_0000, + [1662015973.914270][3126:3132] CHIP:DMG: ListIndex = Null, disabled: true - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" @@ -1359,34 +1374,31 @@ tests: ./chip-tool accesscontrol read acl 1 0 On TH1(Chiptool) , Verify that the AccessControlEntryStruct contains 2 elements with Subjects as null and and Target as TARGETS - [1657542633.704684][3522:3527] CHIP:DMG: } - [1657542633.705098][3522:3527] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3549245792 - [1657542633.705191][3522:3527] CHIP:TOO: ACL: 2 entries - [1657542633.705237][3522:3527] CHIP:TOO: [1]: { - [1657542633.705278][3522:3527] CHIP:TOO: Privilege: 5 - [1657542633.705303][3522:3527] CHIP:TOO: AuthMode: 2 - [1657542633.705329][3522:3527] CHIP:TOO: Subjects: 1 entries - [1657542633.705358][3522:3527] CHIP:TOO: [1]: 112233 - [1657542633.705384][3522:3527] CHIP:TOO: Targets: null - [1657542633.705407][3522:3527] CHIP:TOO: FabricIndex: 1 - [1657542633.705429][3522:3527] CHIP:TOO: } - [1657542633.705465][3522:3527] CHIP:TOO: [2]: { - [1657542633.705489][3522:3527] CHIP:TOO: Privilege: 3 - [1657542633.705511][3522:3527] CHIP:TOO: AuthMode: 2 - [1657542633.705533][3522:3527] CHIP:TOO: Subjects: null - [1657542633.705561][3522:3527] CHIP:TOO: Targets: 2 entries - [1657542633.705612][3522:3527] CHIP:TOO: [1]: { - [1657542633.705637][3522:3527] CHIP:TOO: Cluster: 40 - [1657542633.705662][3522:3527] CHIP:TOO: Endpoint: null - [1657542633.705684][3522:3527] CHIP:TOO: DeviceType: null - [1657542633.705706][3522:3527] CHIP:TOO: } - [1657542633.705736][3522:3527] CHIP:TOO: [2]: { - [1657542633.705759][3522:3527] CHIP:TOO: Cluster: 28 - [1657542633.705781][3522:3527] CHIP:TOO: Endpoint: null - [1657542633.705804][3522:3527] CHIP:TOO: DeviceType: null - [1657542633.705825][3522:3527] CHIP:TOO: } - [1657542633.705849][3522:3527] CHIP:TOO: FabricIndex: 1 - [1657542633.705871][3522:3527] CHIP:TOO: } + [1662016086.501582][3138:3143] CHIP:TOO: ACL: 2 entries + [1662016086.501643][3138:3143] CHIP:TOO: [1]: { + [1662016086.501673][3138:3143] CHIP:TOO: Privilege: 5 + [1662016086.501698][3138:3143] CHIP:TOO: AuthMode: 2 + [1662016086.501727][3138:3143] CHIP:TOO: Subjects: 1 entries + [1662016086.501758][3138:3143] CHIP:TOO: [1]: 112233 + [1662016086.501786][3138:3143] CHIP:TOO: Targets: null + [1662016086.501811][3138:3143] CHIP:TOO: FabricIndex: 1 + [1662016086.501835][3138:3143] CHIP:TOO: } + [1662016086.501873][3138:3143] CHIP:TOO: [2]: { + [1662016086.501899][3138:3143] CHIP:TOO: Privilege: 3 + [1662016086.501924][3138:3143] CHIP:TOO: AuthMode: 2 + [1662016086.501948][3138:3143] CHIP:TOO: Subjects: null + [1662016086.501979][3138:3143] CHIP:TOO: Targets: 2 entries + [1662016086.502016][3138:3143] CHIP:TOO: [1]: { + [1662016086.502043][3138:3143] CHIP:TOO: Cluster: 40 + [1662016086.502069][3138:3143] CHIP:TOO: Endpoint: null + [1662016086.502094][3138:3143] CHIP:TOO: DeviceType: null + [1662016086.502117][3138:3143] CHIP:TOO: } + [1662016086.502148][3138:3143] CHIP:TOO: [2]: { + [1662016086.502174][3138:3143] CHIP:TOO: Cluster: 28 + [1662016086.502198][3138:3143] CHIP:TOO: Endpoint: null + [1662016086.502223][3138:3143] CHIP:TOO: DeviceType: null + [1662016086.502247][3138:3143] CHIP:TOO: } + [1662016086.502273][3138:3143] CHIP:TOO: FabricIndex: 1 disabled: true - label: @@ -1395,7 +1407,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read access-control-entries-per-fabric 1 0 - On TH1(Chiptool), verify with value 3 or greater as AccessControlEntriesPerFabric + On TH1(Chiptool), verify with value 3 or greater as AccessControlEntriesPerFabric,value is stored as MAXENTRIES [1656594850.964909][4043:4048] CHIP:DMG: AttributeReportIBs = [1656594850.964954][4043:4048] CHIP:DMG: [ @@ -1431,15 +1443,15 @@ tests: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing MAXENTRIES elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) - Subjects field: null Targets field: null 2.struct Privilege field: + Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: null subsequent elements same as second element" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": null, "targets": null}, + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":null}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing MAXENTRIES elements + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing MAXENTRIES elements [1657617362.022161][8840:8845] CHIP:DMG: WriteResponseMessage = [1657617362.022190][8840:8845] CHIP:DMG: { @@ -1527,27 +1539,29 @@ tests: [1657543165.385093][3592:3597] CHIP:DMG: } [1657543165.385508][3592:3597] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3549245812 [1657543165.385586][3592:3597] CHIP:TOO: ACL: 3 entries - [1657543165.385627][3592:3597] CHIP:TOO: [1]: { - [1657543165.385666][3592:3597] CHIP:TOO: Privilege: 5 - [1657543165.385689][3592:3597] CHIP:TOO: AuthMode: 2 - [1657543165.385712][3592:3597] CHIP:TOO: Subjects: null - [1657543165.385734][3592:3597] CHIP:TOO: Targets: null - [1657543165.385756][3592:3597] CHIP:TOO: FabricIndex: 1 - [1657543165.385777][3592:3597] CHIP:TOO: } - [1657543165.385807][3592:3597] CHIP:TOO: [2]: { - [1657543165.385830][3592:3597] CHIP:TOO: Privilege: 3 - [1657543165.385851][3592:3597] CHIP:TOO: AuthMode: 2 - [1657543165.385872][3592:3597] CHIP:TOO: Subjects: null - [1657543165.385893][3592:3597] CHIP:TOO: Targets: null - [1657543165.385914][3592:3597] CHIP:TOO: FabricIndex: 1 - [1657543165.385935][3592:3597] CHIP:TOO: } - [1657543165.385964][3592:3597] CHIP:TOO: [3]: { - [1657543165.385986][3592:3597] CHIP:TOO: Privilege: 3 - [1657543165.386007][3592:3597] CHIP:TOO: AuthMode: 2 - [1657543165.386028][3592:3597] CHIP:TOO: Subjects: null - [1657543165.386050][3592:3597] CHIP:TOO: Targets: null - [1657543165.386070][3592:3597] CHIP:TOO: FabricIndex: 1 - [1657543165.386091][3592:3597] CHIP:TOO: } + [1662014580.521093][2979:2984] CHIP:TOO: ACL: 3 entries + [1662014580.521143][2979:2984] CHIP:TOO: [1]: { + [1662014580.523697][2979:2984] CHIP:TOO: Privilege: 5 + [1662014580.523728][2979:2984] CHIP:TOO: AuthMode: 2 + [1662014580.523754][2979:2984] CHIP:TOO: Subjects: 1 entries + [1662014580.523781][2979:2984] CHIP:TOO: [1]: 112233 + [1662014580.523803][2979:2984] CHIP:TOO: Targets: null + [1662014580.523823][2979:2984] CHIP:TOO: FabricIndex: 1 + [1662014580.523842][2979:2984] CHIP:TOO: } + [1662014580.523870][2979:2984] CHIP:TOO: [2]: { + [1662014580.523891][2979:2984] CHIP:TOO: Privilege: 3 + [1662014580.523910][2979:2984] CHIP:TOO: AuthMode: 2 + [1662014580.523930][2979:2984] CHIP:TOO: Subjects: null + [1662014580.523948][2979:2984] CHIP:TOO: Targets: null + [1662014580.523967][2979:2984] CHIP:TOO: FabricIndex: 1 + [1662014580.523985][2979:2984] CHIP:TOO: } + [1662014580.524010][2979:2984] CHIP:TOO: [3]: { + [1662014580.524030][2979:2984] CHIP:TOO: Privilege: 3 + [1662014580.524049][2979:2984] CHIP:TOO: AuthMode: 2 + [1662014580.524068][2979:2984] CHIP:TOO: Subjects: null + [1662014580.524086][2979:2984] CHIP:TOO: Targets: null + [1662014580.524105][2979:2984] CHIP:TOO: FabricIndex: 1 + [1662014580.524124][2979:2984] CHIP:TOO: } disabled: true - label: @@ -1560,7 +1574,7 @@ tests: verification: | ./chip-tool accesscontrol write acl '[{"privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 1, "subjects": null, "targets":null}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path with PASE Authmode + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path with PASE Authmode [1658475475.310438][3113:3119] CHIP:DMG: { [1658475475.310466][3113:3119] CHIP:DMG: AttributeStatusIBs = [1658475475.310500][3113:3119] CHIP:DMG: [ @@ -1705,7 +1719,7 @@ tests: ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 5, "authMode": 3, "subjects": null, "targets":null}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to Administer Privilege with Group AuthMode + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to Administer Privilege with Group AuthMode [1658475916.602576][3151:3156] CHIP:DMG: WriteResponseMessage = [1658475916.602649][3151:3156] CHIP:DMG: { [1658475916.602684][3151:3156] CHIP:DMG: AttributeStatusIBs = @@ -1782,7 +1796,7 @@ tests: { "privilege": 6, "authMode": 2, "subjects": null, "targets":null}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid privilege . + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid privilege . [1658476127.774933][3171:3176] CHIP:EM: Removed CHIP MessageCounter:240294498 from RetransTable on exchange 6954i [1658476127.775074][3171:3176] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -1860,7 +1874,7 @@ tests: ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 4, "subjects": null, "targets":null}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Authmode . + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Authmode . [1658476412.664216][3192:3197] CHIP:DMG: WriteResponseMessage = [1658476412.664247][3192:3197] CHIP:DMG: { [1658476412.664275][3192:3197] CHIP:DMG: AttributeStatusIBs = @@ -1935,7 +1949,7 @@ tests: ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": [0], "targets":null}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Subject field . + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Subject field . [1658476622.665126][3229:3234] CHIP:DMG: WriteClient moving to [ResponseRe] [1658476622.665195][3229:3234] CHIP:DMG: WriteResponseMessage = [1658476622.665225][3229:3234] CHIP:DMG: { @@ -2011,7 +2025,7 @@ tests: { "privilege": 3, "authMode": 2, "subjects": [18446744073709551615], "targets":null}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Subject field . + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Subject field . 1658476861.356730][3250:3255] CHIP:DMG: { [1658476861.356767][3250:3255] CHIP:DMG: AttributeStatusIBs = [1658476861.356813][3250:3255] CHIP:DMG: [ @@ -2078,13 +2092,13 @@ tests: is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: CASE (2) Subjects field: [0xFFFFFFFD_BAD_NONE0000000] - Targets field: null" + AuthMode field: CASE (2) Subjects field: [0xFFFFFFFD00000000] Targets + field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": [18446744060824649728], "targets": null}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Subject field . + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Subject field . 8477037.056167][3264:3269] CHIP:DMG: { [1658477037.056200][3264:3269] CHIP:DMG: AttributePathIB = [1658477037.056238][3264:3269] CHIP:DMG: { @@ -2155,7 +2169,7 @@ tests: ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": [18446744073709486080], "targets":null}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Subject field . + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Subject field . 658477229.869987][3634:3640] CHIP:EM: Removed CHIP MessageCounter:189477251 from RetransTable on exchange 22058i [1658477229.870031][3634:3640] CHIP:DMG: WriteClient moving to [ResponseRe] [1658477229.870093][3634:3640] CHIP:DMG: WriteResponseMessage = @@ -2227,8 +2241,8 @@ tests: verification: | ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": null }]}]' 1 0 - On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using - Invalid Target Field for second element path Returns CONSTRAINT_ERROR (0x87) + + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field . 1658477371.966712][3679:3684] CHIP:EM: Removed CHIP MessageCounter:138419251 from RetransTable on exchange 40076i [1658477371.966756][3679:3684] CHIP:DMG: WriteClient moving to [ResponseRe] [1658477371.966830][3679:3684] CHIP:DMG: WriteResponseMessage = @@ -2303,7 +2317,7 @@ tests: verification: | ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 4294967295, "endpoint": null, "deviceType": null }]}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field . + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field . [1657617852.177018][8933:8938] CHIP:DMG: WriteResponseMessage = [1657617852.177055][8933:8938] CHIP:DMG: { [1657617852.177086][8933:8938] CHIP:DMG: AttributeStatusIBs = @@ -2377,7 +2391,7 @@ tests: verification: | ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 65535, "deviceType": null }]}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field . + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field . [1657617920.044059][8948:8953] CHIP:DMG: { [1657617920.044085][8948:8953] CHIP:DMG: AttributeStatusIBs = [1657617920.044120][8948:8953] CHIP:DMG: [ @@ -2450,7 +2464,7 @@ tests: verification: | ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": 4294967295 }]}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field . + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field . @@ -2526,7 +2540,7 @@ tests: verification: | ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 22, "deviceType": 33 }]}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field with both Endpoint and DeviceType fields present + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field with both Endpoint and DeviceType fields present [1658477583.616961][3701:3706] CHIP:DMG: WriteClient moving to [ResponseRe] [1658477583.617072][3701:3706] CHIP:DMG: WriteResponseMessage = [1658477583.617120][3701:3706] CHIP:DMG: { @@ -2603,7 +2617,7 @@ tests: ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": 33 }]}]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field + On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field [1658477662.415412][3710:3715] CHIP:EM: Removed CHIP MessageCounter:35384027 from RetransTable on exchange 6953i [1658477662.415452][3710:3715] CHIP:DMG: WriteClient moving to [ResponseRe] [1658477662.415535][3710:3715] CHIP:DMG: WriteResponseMessage = @@ -2676,7 +2690,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute , since all ACL entries removed + On TH1(Chiptool), Verify that the status is success for acl attribute value is an empty list since all ACL entries removed RetransTable on exchange 43997i [1660632377.411062][3241:3246] CHIP:DMG: WriteClient moving to [ResponseRe] [1660632377.411111][3241:3246] CHIP:DMG: WriteResponseMessage = diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_5.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_5.yaml index bdd2f5ca9b3fb9..60f9e277dbea10 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_5.yaml @@ -93,7 +93,7 @@ tests: 1.struct Data field: D_OK_EMPTY : 1718" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"1718"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"1718"}]' 1 0 On TH1(Chiptool), Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element 217.510779][2371:2376] CHIP:DMG: AttributePathIB = @@ -170,7 +170,7 @@ tests: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]' 1 0 On TH1(Chiptool) , Verify Successfully extension attribute list containing one element 7284747.131523][2411:2416] CHIP:DMG: StatusIB = [1657284747.131568][2411:2416] CHIP:DMG: { @@ -251,7 +251,7 @@ tests: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003248656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E2E0018" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003248656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E2E0018"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003248656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E2E0018"}]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster Extension attribute value is list of AccessControlExtensionStruct containing 1 element Data, exceeds maximum length. @@ -305,7 +305,7 @@ tests: :17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"1718"},{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"1718"},{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 2 elements Returns 0x87 (CONSTRAINT_ERROR)-as there are more than 1 entry @@ -358,7 +358,7 @@ tests: value is an empty list" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[]" 1 0 + ./chip-tool accesscontrol write extension '[]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is an empty list diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_6.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_6.yaml index 2a4d89ddfc01b5..29f6c021e96c02 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_6.yaml @@ -117,8 +117,8 @@ tests: AuthMode field: Group (3) Subjects field: null Targets field: null" PICS: ACL.S.E00 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 3, "subjects": null, "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 3, "subjects": null, "targets":null}]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster AccessControlEntryChanged event containing 2 elements [[1657545728.526415][3928:3933] CHIP:DMG: WriteResponseMessage = @@ -266,77 +266,31 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: Group (3) Subjects field: null Targets field: null" + is list of AccessControlEntryStruct containing 2 elements. The first + item is valid, the second item is invalid due to group ID 0 being + used, which is illegal. 1.struct Privilege field: Administer (5) + AuthMode field: CASE (2) Subjects field: [N1] Targets field: null + 2.struct Privilege field: Operate (3) AuthMode field: Group (3) + Subjects field: [0] Targets field: null" PICS: ACL.S.E00 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 3, "subjects": null, "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 3, "subjects": [0], "targets":null}]' 1 0 On TH1(Chiptool) ,verify AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 2 elements - 58813102.344539][2489:2494] CHIP:EM: Removed CHIP MessageCounter:131488146 from RetransTable on exchange 37188i - [1658813102.344581][2489:2494] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658813102.344655][2489:2494] CHIP:DMG: WriteResponseMessage = - [1658813102.344711][2489:2494] CHIP:DMG: { - [1658813102.344741][2489:2494] CHIP:DMG: AttributeStatusIBs = - [1658813102.344798][2489:2494] CHIP:DMG: [ - [1658813102.344831][2489:2494] CHIP:DMG: AttributeStatusIB = - [1658813102.344883][2489:2494] CHIP:DMG: { - [1658813102.344918][2489:2494] CHIP:DMG: AttributePathIB = - [1658813102.344973][2489:2494] CHIP:DMG: { - [1658813102.345027][2489:2494] CHIP:DMG: Endpoint = 0x0, - [1658813102.345073][2489:2494] CHIP:DMG: Cluster = 0x1f, - [1658813102.345130][2489:2494] CHIP:DMG: Attribute = 0x0000_0000, - [1658813102.345182][2489:2494] CHIP:DMG: } - [1658813102.345231][2489:2494] CHIP:DMG: - [1658813102.345280][2489:2494] CHIP:DMG: StatusIB = - [1658813102.345322][2489:2494] CHIP:DMG: { - [1658813102.345377][2489:2494] CHIP:DMG: status = 0x00 (SUCCESS), - [1658813102.345430][2489:2494] CHIP:DMG: }, - [1658813102.345469][2489:2494] CHIP:DMG: - [1658813102.345509][2489:2494] CHIP:DMG: }, - [1658813102.345549][2489:2494] CHIP:DMG: - [1658813102.345577][2489:2494] CHIP:DMG: AttributeStatusIB = - [1658813102.345606][2489:2494] CHIP:DMG: { - [1658813102.345644][2489:2494] CHIP:DMG: AttributePathIB = - [1658813102.345678][2489:2494] CHIP:DMG: { - [1658813102.345714][2489:2494] CHIP:DMG: Endpoint = 0x0, - [1658813102.345754][2489:2494] CHIP:DMG: Cluster = 0x1f, - [1658813102.345795][2489:2494] CHIP:DMG: Attribute = 0x0000_0000, - [1658813102.345831][2489:2494] CHIP:DMG: ListIndex = Null, - [1658813102.345866][2489:2494] CHIP:DMG: } - [1658813102.345903][2489:2494] CHIP:DMG: - [1658813102.345937][2489:2494] CHIP:DMG: StatusIB = - [1658813102.345970][2489:2494] CHIP:DMG: { - [1658813102.346008][2489:2494] CHIP:DMG: status = 0x00 (SUCCESS), - [1658813102.346043][2489:2494] CHIP:DMG: }, - [1658813102.346078][2489:2494] CHIP:DMG: - [1658813102.346106][2489:2494] CHIP:DMG: }, - [1658813102.346145][2489:2494] CHIP:DMG: - [1658813102.346169][2489:2494] CHIP:DMG: AttributeStatusIB = - [1658813102.346194][2489:2494] CHIP:DMG: { - [1658813102.346233][2489:2494] CHIP:DMG: AttributePathIB = - [1658813102.346265][2489:2494] CHIP:DMG: { - [1658813102.346297][2489:2494] CHIP:DMG: Endpoint = 0x0, - [1658813102.346341][2489:2494] CHIP:DMG: Cluster = 0x1f, - [1658813102.346382][2489:2494] CHIP:DMG: Attribute = 0x0000_0000, - [1658813102.346417][2489:2494] CHIP:DMG: ListIndex = Null, - [1658813102.346452][2489:2494] CHIP:DMG: } - [1658813102.346487][2489:2494] CHIP:DMG: - [1658813102.346520][2489:2494] CHIP:DMG: StatusIB = - [1658813102.346590][2489:2494] CHIP:DMG: { - [1658813102.346630][2489:2494] CHIP:DMG: status = 0x00 (SUCCESS), - [1658813102.346667][2489:2494] CHIP:DMG: }, - [1658813102.346701][2489:2494] CHIP:DMG: - [1658813102.346731][2489:2494] CHIP:DMG: }, - [1658813102.346764][2489:2494] CHIP:DMG: - [1658813102.346796][2489:2494] CHIP:DMG: ], - [1658813102.346837][2489:2494] CHIP:DMG: - [1658813102.346864][2489:2494] CHIP:DMG: InteractionModelRevision = 1 - [1658813102.346891][2489:2494] CHIP:DMG: } - [1658813102.347080][2489:2494] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658813102.347150][2489:2494] CHIP:EM: Sending Standalone Ack for MessageCounter:54598939 on + + [1662107205.364278][89333:89338] CHIP:DMG: { + [1662107205.364298][89333:89338] CHIP:DMG: AttributePathIB = + [1662107205.364315][89333:89338] CHIP:DMG: { + [1662107205.364332][89333:89338] CHIP:DMG: Endpoint = 0x0, + [1662107205.364352][89333:89338] CHIP:DMG: Cluster = 0x1f, + [1662107205.364372][89333:89338] CHIP:DMG: Attribute = 0x0000_0000, + [1662107205.364388][89333:89338] CHIP:DMG: ListIndex = Null, + [1662107205.364407][89333:89338] CHIP:DMG: } + [1662107205.364437][89333:89338] CHIP:DMG: + [1662107205.364458][89333:89338] CHIP:DMG: StatusIB = + [1662107205.364477][89333:89338] CHIP:DMG: { + [1662107205.364493][89333:89338] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), + [1662107205.364511][89333:89338] CHIP:DMG: }, disabled: true - label: @@ -347,152 +301,58 @@ tests: ./chip-tool accesscontrol read-event access-control-entry-changed 1 0 On TH1(Chiptool) , Verify AccessControl cluster AccessControlEntryChanged event containing - at least 3 new elements and MUST NOT contain an added event for the third entry + at least 3 new elements and MUST NOT contain an added event for second entry written at step 6 - [1661182764.896026][19503:19508] CHIP:DMG: - [1661182764.896029][19503:19508] CHIP:DMG: SuppressResponse = true, - [1661182764.896033][19503:19508] CHIP:DMG: InteractionModelRevision = 1 - [1661182764.896035][19503:19508] CHIP:DMG: } - [1661182764.896123][19503:19508] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661182764.896126][19503:19508] CHIP:TOO: Event number: 3 - [1661182764.896129][19503:19508] CHIP:TOO: Priority: Info - [1661182764.896131][19503:19508] CHIP:TOO: Timestamp: 31085832 - [1661182764.896155][19503:19508] CHIP:TOO: AccessControlEntryChanged: { - [1661182764.896158][19503:19508] CHIP:TOO: AdminNodeID: null - [1661182764.896163][19503:19508] CHIP:TOO: AdminPasscodeID: 0 - [1661182764.896167][19503:19508] CHIP:TOO: ChangeType: 1 - [1661182764.896173][19503:19508] CHIP:TOO: LatestValue: { - [1661182764.896176][19503:19508] CHIP:TOO: Privilege: 5 - [1661182764.896179][19503:19508] CHIP:TOO: AuthMode: 2 - [1661182764.896183][19503:19508] CHIP:TOO: Subjects: 1 entries - [1661182764.896188][19503:19508] CHIP:TOO: [1]: 112233 - [1661182764.896191][19503:19508] CHIP:TOO: Targets: null - [1661182764.896194][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896197][19503:19508] CHIP:TOO: } - [1661182764.896199][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896202][19503:19508] CHIP:TOO: } - [1661182764.896227][19503:19508] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661182764.896230][19503:19508] CHIP:TOO: Event number: 4 - [1661182764.896232][19503:19508] CHIP:TOO: Priority: Info - [1661182764.896234][19503:19508] CHIP:TOO: Timestamp: 31297570 - [1661182764.896246][19503:19508] CHIP:TOO: AccessControlEntryChanged: { - [1661182764.896249][19503:19508] CHIP:TOO: AdminNodeID: 112233 - [1661182764.896252][19503:19508] CHIP:TOO: AdminPasscodeID: null - [1661182764.896254][19503:19508] CHIP:TOO: ChangeType: 2 - [1661182764.896257][19503:19508] CHIP:TOO: LatestValue: { - [1661182764.896259][19503:19508] CHIP:TOO: Privilege: 5 - [1661182764.896262][19503:19508] CHIP:TOO: AuthMode: 2 - [1661182764.896265][19503:19508] CHIP:TOO: Subjects: 1 entries - [1661182764.896268][19503:19508] CHIP:TOO: [1]: 112233 - [1661182764.896271][19503:19508] CHIP:TOO: Targets: null - [1661182764.896274][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896276][19503:19508] CHIP:TOO: } - [1661182764.896279][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896281][19503:19508] CHIP:TOO: } - [1661182764.896309][19503:19508] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661182764.896311][19503:19508] CHIP:TOO: Event number: 5 - [1661182764.896313][19503:19508] CHIP:TOO: Priority: Info - [1661182764.896315][19503:19508] CHIP:TOO: Timestamp: 31297570 - [1661182764.896320][19503:19508] CHIP:TOO: AccessControlEntryChanged: { - [1661182764.896323][19503:19508] CHIP:TOO: AdminNodeID: 112233 - [1661182764.896325][19503:19508] CHIP:TOO: AdminPasscodeID: null - [1661182764.896327][19503:19508] CHIP:TOO: ChangeType: 1 - [1661182764.896330][19503:19508] CHIP:TOO: LatestValue: { - [1661182764.896332][19503:19508] CHIP:TOO: Privilege: 5 - [1661182764.896335][19503:19508] CHIP:TOO: AuthMode: 2 - [1661182764.896338][19503:19508] CHIP:TOO: Subjects: 1 entries - [1661182764.896341][19503:19508] CHIP:TOO: [1]: 112233 - [1661182764.896343][19503:19508] CHIP:TOO: Targets: null - [1661182764.896346][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896348][19503:19508] CHIP:TOO: } - [1661182764.896351][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896353][19503:19508] CHIP:TOO: } - [1661182764.896375][19503:19508] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661182764.896377][19503:19508] CHIP:TOO: Event number: 6 - [1661182764.896380][19503:19508] CHIP:TOO: Priority: Info - [1661182764.896381][19503:19508] CHIP:TOO: Timestamp: 31297571 - [1661182764.896386][19503:19508] CHIP:TOO: AccessControlEntryChanged: { - [1661182764.896389][19503:19508] CHIP:TOO: AdminNodeID: 112233 - [1661182764.896392][19503:19508] CHIP:TOO: AdminPasscodeID: null - [1661182764.896394][19503:19508] CHIP:TOO: ChangeType: 1 - [1661182764.896397][19503:19508] CHIP:TOO: LatestValue: { - [1661182764.896399][19503:19508] CHIP:TOO: Privilege: 3 - [1661182764.896402][19503:19508] CHIP:TOO: AuthMode: 3 - [1661182764.896405][19503:19508] CHIP:TOO: Subjects: null - [1661182764.896407][19503:19508] CHIP:TOO: Targets: null - [1661182764.896410][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896412][19503:19508] CHIP:TOO: } - [1661182764.896414][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896417][19503:19508] CHIP:TOO: } - [1661182764.896439][19503:19508] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661182764.896441][19503:19508] CHIP:TOO: Event number: 7 - [1661182764.896444][19503:19508] CHIP:TOO: Priority: Info - [1661182764.896446][19503:19508] CHIP:TOO: Timestamp: 32234085 - [1661182764.896450][19503:19508] CHIP:TOO: AccessControlEntryChanged: { - [1661182764.896453][19503:19508] CHIP:TOO: AdminNodeID: 112233 - [1661182764.896455][19503:19508] CHIP:TOO: AdminPasscodeID: null - [1661182764.896459][19503:19508] CHIP:TOO: ChangeType: 2 - [1661182764.896461][19503:19508] CHIP:TOO: LatestValue: { - [1661182764.896464][19503:19508] CHIP:TOO: Privilege: 3 - [1661182764.896467][19503:19508] CHIP:TOO: AuthMode: 3 - [1661182764.896469][19503:19508] CHIP:TOO: Subjects: null - [1661182764.896472][19503:19508] CHIP:TOO: Targets: null - [1661182764.896474][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896476][19503:19508] CHIP:TOO: } - [1661182764.896478][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896480][19503:19508] CHIP:TOO: } - [1661182764.896504][19503:19508] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661182764.896507][19503:19508] CHIP:TOO: Event number: 8 - [1661182764.896509][19503:19508] CHIP:TOO: Priority: Info - [1661182764.896511][19503:19508] CHIP:TOO: Timestamp: 32234085 - [1661182764.896516][19503:19508] CHIP:TOO: AccessControlEntryChanged: { - [1661182764.896519][19503:19508] CHIP:TOO: AdminNodeID: 112233 - [1661182764.896521][19503:19508] CHIP:TOO: AdminPasscodeID: null - [1661182764.896524][19503:19508] CHIP:TOO: ChangeType: 2 - [1661182764.896526][19503:19508] CHIP:TOO: LatestValue: { - [1661182764.896529][19503:19508] CHIP:TOO: Privilege: 5 - [1661182764.896531][19503:19508] CHIP:TOO: AuthMode: 2 - [1661182764.896534][19503:19508] CHIP:TOO: Subjects: 1 entries - [1661182764.896537][19503:19508] CHIP:TOO: [1]: 112233 - [1661182764.896539][19503:19508] CHIP:TOO: Targets: null - [1661182764.896542][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896544][19503:19508] CHIP:TOO: } - [1661182764.896547][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896549][19503:19508] CHIP:TOO: } - [1661182764.896574][19503:19508] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661182764.896576][19503:19508] CHIP:TOO: Event number: 9 - [1661182764.896579][19503:19508] CHIP:TOO: Priority: Info - [1661182764.896580][19503:19508] CHIP:TOO: Timestamp: 32234086 - [1661182764.896585][19503:19508] CHIP:TOO: AccessControlEntryChanged: { - [1661182764.896588][19503:19508] CHIP:TOO: AdminNodeID: 112233 - [1661182764.896591][19503:19508] CHIP:TOO: AdminPasscodeID: null - [1661182764.896593][19503:19508] CHIP:TOO: ChangeType: 1 - [1661182764.896596][19503:19508] CHIP:TOO: LatestValue: { - [1661182764.896598][19503:19508] CHIP:TOO: Privilege: 5 - [1661182764.896601][19503:19508] CHIP:TOO: AuthMode: 2 - [1661182764.896603][19503:19508] CHIP:TOO: Subjects: 1 entries - [1661182764.896606][19503:19508] CHIP:TOO: [1]: 112233 - [1661182764.896609][19503:19508] CHIP:TOO: Targets: null - [1661182764.896611][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896613][19503:19508] CHIP:TOO: } - [1661182764.896616][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896618][19503:19508] CHIP:TOO: } - [1661182764.896641][19503:19508] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661182764.896644][19503:19508] CHIP:TOO: Event number: 10 - [1661182764.896646][19503:19508] CHIP:TOO: Priority: Info - [1661182764.896648][19503:19508] CHIP:TOO: Timestamp: 32234086 - [1661182764.896653][19503:19508] CHIP:TOO: AccessControlEntryChanged: { - [1661182764.896655][19503:19508] CHIP:TOO: AdminNodeID: 112233 - [1661182764.896658][19503:19508] CHIP:TOO: AdminPasscodeID: null - [1661182764.896661][19503:19508] CHIP:TOO: ChangeType: 1 - [1661182764.896663][19503:19508] CHIP:TOO: LatestValue: { - [1661182764.896666][19503:19508] CHIP:TOO: Privilege: 3 - [1661182764.896668][19503:19508] CHIP:TOO: AuthMode: 3 - [1661182764.896671][19503:19508] CHIP:TOO: Subjects: null - [1661182764.896673][19503:19508] CHIP:TOO: Targets: null - [1661182764.896676][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896678][19503:19508] CHIP:TOO: } - [1661182764.896681][19503:19508] CHIP:TOO: FabricIndex: 1 - [1661182764.896683][19503:19508] CHIP:TOO: } - [1661182764.896736][19503:19508] CHIP:EM: Sending Standalone Ack for MessageCounter:4970735 on exchange 19422i + [1662107335.746678][89356:89361] CHIP:TOO: Event number: 10 + [1662107335.746688][89356:89361] CHIP:TOO: Priority: Info + [1662107335.746698][89356:89361] CHIP:TOO: Timestamp: 370685212 + [1662107335.746722][89356:89361] CHIP:TOO: AccessControlEntryChanged: { + [1662107335.746736][89356:89361] CHIP:TOO: AdminNodeID: 112233 + [1662107335.746750][89356:89361] CHIP:TOO: AdminPasscodeID: null + [1662107335.746763][89356:89361] CHIP:TOO: ChangeType: 2 + [1662107335.746774][89356:89361] CHIP:TOO: LatestValue: { + [1662107335.746786][89356:89361] CHIP:TOO: Privilege: 3 + [1662107335.746797][89356:89361] CHIP:TOO: AuthMode: 3 + [1662107335.746810][89356:89361] CHIP:TOO: Subjects: null + [1662107335.746823][89356:89361] CHIP:TOO: Targets: null + [1662107335.746837][89356:89361] CHIP:TOO: FabricIndex: 1 + [1662107335.746850][89356:89361] CHIP:TOO: } + [1662107335.746863][89356:89361] CHIP:TOO: FabricIndex: 1 + [1662107335.746875][89356:89361] CHIP:TOO: } + [1662107335.746995][89356:89361] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1662107335.747009][89356:89361] CHIP:TOO: Event number: 11 + [1662107335.747020][89356:89361] CHIP:TOO: Priority: Info + [1662107335.747032][89356:89361] CHIP:TOO: Timestamp: 370685213 + [1662107335.747058][89356:89361] CHIP:TOO: AccessControlEntryChanged: { + [1662107335.747073][89356:89361] CHIP:TOO: AdminNodeID: 112233 + [1662107335.747085][89356:89361] CHIP:TOO: AdminPasscodeID: null + [1662107335.747097][89356:89361] CHIP:TOO: ChangeType: 2 + [1662107335.747108][89356:89361] CHIP:TOO: LatestValue: { + [1662107335.747119][89356:89361] CHIP:TOO: Privilege: 5 + [1662107335.747130][89356:89361] CHIP:TOO: AuthMode: 2 + [1662107335.747144][89356:89361] CHIP:TOO: Subjects: 1 entries + [1662107335.747160][89356:89361] CHIP:TOO: [1]: 112233 + [1662107335.747175][89356:89361] CHIP:TOO: Targets: null + [1662107335.747188][89356:89361] CHIP:TOO: FabricIndex: 1 + [1662107335.747201][89356:89361] CHIP:TOO: } + [1662107335.747214][89356:89361] CHIP:TOO: FabricIndex: 1 + [1662107335.747226][89356:89361] CHIP:TOO: } + [1662107335.747348][89356:89361] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1662107335.747362][89356:89361] CHIP:TOO: Event number: 12 + [1662107335.747374][89356:89361] CHIP:TOO: Priority: Info + [1662107335.747385][89356:89361] CHIP:TOO: Timestamp: 370685215 + [1662107335.747412][89356:89361] CHIP:TOO: AccessControlEntryChanged: { + [1662107335.747426][89356:89361] CHIP:TOO: AdminNodeID: 112233 + [1662107335.747438][89356:89361] CHIP:TOO: AdminPasscodeID: null + [1662107335.747450][89356:89361] CHIP:TOO: ChangeType: 1 + [1662107335.747461][89356:89361] CHIP:TOO: LatestValue: { + [1662107335.747473][89356:89361] CHIP:TOO: Privilege: 5 + [1662107335.747484][89356:89361] CHIP:TOO: AuthMode: 2 + [1662107335.747500][89356:89361] CHIP:TOO: Subjects: 1 entries + [1662107335.747516][89356:89361] CHIP:TOO: [1]: 112233 + [1662107335.747530][89356:89361] CHIP:TOO: Targets: null + [1662107335.747543][89356:89361] CHIP:TOO: FabricIndex: 1 + [1662107335.747554][89356:89361] CHIP:TOO: } + [1662107335.747565][89356:89361] CHIP:TOO: FabricIndex: 1 + [1662107335.747576][89356:89361] CHIP:TOO: } disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml index a7d3a582e4e7cc..569358ebba7e56 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml @@ -84,7 +84,7 @@ tests: "TH2 reads DUT Endpoint 0 OperationalCredentials cluster CurrentFabricIndex attribute" verification: | - ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-name-beta + ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-name beta On TH2(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 2 [1657186956.724761][3910:3915] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 3161849734 @@ -203,7 +203,7 @@ tests: [1657187433.621369][10890:10895] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 3415499944 [1657187433.621422][10890:10895] CHIP:TOO: Extension: 1 entries [1657187433.621470][10890:10895] CHIP:TOO: [1]: { - [1657187433.621498][10890:10895] CHIP:TOO: Data: 1000110010001100 + [1657187433.621498][10890:10895] CHIP:TOO: Data: 1718 [1657187433.621534][10890:10895] CHIP:TOO: FabricIndex: 1 [1657187433.621557][10890:10895] CHIP:TOO: } disabled: true @@ -252,7 +252,7 @@ tests: AccessControlExtensionChanged event" PICS: ACL.S.E01 verification: | - ./chip-tool accesscontrol read-event access-control-extension-changed 2 --commissioner-name beta + ./chip-tool accesscontrol read-event access-control-extension-changed 2 0 --commissioner-name beta On TH2(Chiptool) , Verify AccessControlExtensionChanged containing 1 element, and MUST NOT contain an element with FabricIndex F1 [1658327551.622018][4295:4300] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 [1658327551.622043][4295:4300] CHIP:TOO: Event number: 6 diff --git a/src/app/tests/suites/certification/Test_TC_BR_2.yaml b/src/app/tests/suites/certification/Test_TC_BR_2.yaml index 45039e715732c1..a515357fea095b 100644 --- a/src/app/tests/suites/certification/Test_TC_BR_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BR_2.yaml @@ -24,6 +24,13 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. DUT has been commissioned to TH + + 2.Two or more bridged devices of a supported type connected via non-Matter network/protocol to DUT (bridge) + disabled: true + - label: "Read PartsList and DeviceTypeList attributes of the Descriptor cluster of endpoint 0 For each endpoint listed in the PartsList @@ -204,32 +211,29 @@ tests: Verify in TH(chip-tool) Log [1657004014.927308][4678:4683] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1398882309 - [1657004014.927387][4678:4683] CHIP:TOO: device list: 2 entries - [1657004014.927460][4678:4683] CHIP:TOO: [1]: { - [1657004014.927514][4678:4683] CHIP:TOO: Type: 259 - [1657004014.927551][4678:4683] CHIP:TOO: Revision: 1 - [1657004014.927585][4678:4683] CHIP:TOO: } - [1657004014.927622][4678:4683] CHIP:TOO: [2]: { - [1657004014.927650][4678:4683] CHIP:TOO: Type: 19 - [1657004014.927678][4678:4683] CHIP:TOO: Revision: 1 - [1657004014.927705][4678:4683] CHIP:TOO: } - + [1663141236.408628][40968:40973] CHIP:TOO: device list: 2 entries + [1663141236.408688][40968:40973] CHIP:TOO: [1]: { + [1663141236.408723][40968:40973] CHIP:TOO: Type: 770 + [1663141236.408744][40968:40973] CHIP:TOO: Revision: 1 + [1663141236.408762][40968:40973] CHIP:TOO: } + [1663141236.408791][40968:40973] CHIP:TOO: [2]: { + [1663141236.408812][40968:40973] CHIP:TOO: Type: 19 + [1663141236.408836][40968:40973] CHIP:TOO: Revision: 1 + [1663141236.408860][40968:40973] CHIP:TOO: } ./chip-tool descriptor read device-list 1 5 Verify in TH(chip-tool) Log - - [1657004035.789404][4690:4695] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 130458766 - [1657004035.789470][4690:4695] CHIP:TOO: device list: 2 entries - [1657004035.789526][4690:4695] CHIP:TOO: [1]: { - [1657004035.789571][4690:4695] CHIP:TOO: Type: 259 - [1657004035.789601][4690:4695] CHIP:TOO: Revision: 1 - [1657004035.789629][4690:4695] CHIP:TOO: } - [1657004035.789663][4690:4695] CHIP:TOO: [2]: { - [1657004035.789691][4690:4695] CHIP:TOO: Type: 19 - [1657004035.789717][4690:4695] CHIP:TOO: Revision: 1 - [1657004035.789744][4690:4695] CHIP:TOO: } - + [1663141236.408519][40968:40973] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 934498373 + [1663141236.408628][40968:40973] CHIP:TOO: device list: 2 entries + [1663141236.408688][40968:40973] CHIP:TOO: [1]: { + [1663141236.408723][40968:40973] CHIP:TOO: Type: 770 + [1663141236.408744][40968:40973] CHIP:TOO: Revision: 1 + [1663141236.408762][40968:40973] CHIP:TOO: } + [1663141236.408791][40968:40973] CHIP:TOO: [2]: { + [1663141236.408812][40968:40973] CHIP:TOO: Type: 19 + [1663141236.408836][40968:40973] CHIP:TOO: Revision: 1 + [1663141236.408860][40968:40973] CHIP:TOO: } ./chip-tool descriptor read device-list 1 6 @@ -349,16 +353,15 @@ tests: Verify in TH(chip-tool) Log [1657002348.693948][3989:3994] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1398882309 - [1657002348.694013][3989:3994] CHIP:TOO: device list: 2 entries - [1657002348.694063][3989:3994] CHIP:TOO: [1]: { - [1657002348.694100][3989:3994] CHIP:TOO: Type: 259 - [1657002348.694125][3989:3994] CHIP:TOO: Revision: 1 - [1657002348.694149][3989:3994] CHIP:TOO: } - [1657002348.694176][3989:3994] CHIP:TOO: [2]: { - [1657002348.694199][3989:3994] CHIP:TOO: Type: 19 - [1657002348.694221][3989:3994] CHIP:TOO: Revision: 1 - [1657002348.694242][3989:3994] CHIP:TOO: } - + [1663141236.408628][40968:40973] CHIP:TOO: device list: 2 entries + [1663141236.408688][40968:40973] CHIP:TOO: [1]: { + [1663141236.408723][40968:40973] CHIP:TOO: Type: 770 + [1663141236.408744][40968:40973] CHIP:TOO: Revision: 1 + [1663141236.408762][40968:40973] CHIP:TOO: } + [1663141236.408791][40968:40973] CHIP:TOO: [2]: { + [1663141236.408812][40968:40973] CHIP:TOO: Type: 19 + [1663141236.408836][40968:40973] CHIP:TOO: Revision: 1 + [1663141236.408860][40968:40973] CHIP:TOO: } ./chip-tool descriptor read device-list 1 5 @@ -366,16 +369,15 @@ tests: Verify in TH(chip-tool) Log [1657002369.589492][3996:4001] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 130458766 - [1657002369.589556][3996:4001] CHIP:TOO: device list: 2 entries - [1657002369.589610][3996:4001] CHIP:TOO: [1]: { - [1657002369.589653][3996:4001] CHIP:TOO: Type: 259 - [1657002369.589682][3996:4001] CHIP:TOO: Revision: 1 - [1657002369.589710][3996:4001] CHIP:TOO: } - [1657002369.589742][3996:4001] CHIP:TOO: [2]: { - [1657002369.589768][3996:4001] CHIP:TOO: Type: 19 - [1657002369.589794][3996:4001] CHIP:TOO: Revision: 1 - [1657002369.589819][3996:4001] CHIP:TOO: } - + [1663141236.408628][40968:40973] CHIP:TOO: device list: 2 entries + [1663141236.408688][40968:40973] CHIP:TOO: [1]: { + [1663141236.408723][40968:40973] CHIP:TOO: Type: 770 + [1663141236.408744][40968:40973] CHIP:TOO: Revision: 1 + [1663141236.408762][40968:40973] CHIP:TOO: } + [1663141236.408791][40968:40973] CHIP:TOO: [2]: { + [1663141236.408812][40968:40973] CHIP:TOO: Type: 19 + [1663141236.408836][40968:40973] CHIP:TOO: Revision: 1 + [1663141236.408860][40968:40973] CHIP:TOO: } ./chip-tool descriptor read device-list 1 6 @@ -1173,31 +1175,33 @@ tests: Verify in TH(chip-tool) Log [1657004014.927308][4678:4683] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1398882309 - [1657004014.927387][4678:4683] CHIP:TOO: device list: 2 entries - [1657004014.927460][4678:4683] CHIP:TOO: [1]: { - [1657004014.927514][4678:4683] CHIP:TOO: Type: 259 - [1657004014.927551][4678:4683] CHIP:TOO: Revision: 1 - [1657004014.927585][4678:4683] CHIP:TOO: } - [1657004014.927622][4678:4683] CHIP:TOO: [2]: { - [1657004014.927650][4678:4683] CHIP:TOO: Type: 19 - [1657004014.927678][4678:4683] CHIP:TOO: Revision: 1 - [1657004014.927705][4678:4683] CHIP:TOO: } - + OO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2589882031 + [1663150288.097040][45626:45633] CHIP:TOO: device list: 2 entries + [1663150288.097069][45626:45633] CHIP:TOO: [1]: { + [1663150288.097090][45626:45633] CHIP:TOO: Type: 770 + [1663150288.097109][45626:45633] CHIP:TOO: Revision: 1 + [1663150288.097127][45626:45633] CHIP:TOO: } + [1663150288.097152][45626:45633] CHIP:TOO: [2]: { + [1663150288.097170][45626:45633] CHIP:TOO: Type: 19 + [1663150288.097187][45626:45633] CHIP:TOO: Revision: 1 + [1663150288.097205][45626:45633] CHIP:TOO: } ./chip-tool descriptor read device-list 1 5 Verify in TH(chip-tool) Log [1657004035.789404][4690:4695] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 130458766 - [1657004035.789470][4690:4695] CHIP:TOO: device list: 2 entries - [1657004035.789526][4690:4695] CHIP:TOO: [1]: { - [1657004035.789571][4690:4695] CHIP:TOO: Type: 259 - [1657004035.789601][4690:4695] CHIP:TOO: Revision: 1 - [1657004035.789629][4690:4695] CHIP:TOO: } - [1657004035.789663][4690:4695] CHIP:TOO: [2]: { - [1657004035.789691][4690:4695] CHIP:TOO: Type: 19 - [1657004035.789717][4690:4695] CHIP:TOO: Revision: 1 - [1657004035.789744][4690:4695] CHIP:TOO: } + OO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2589882031 + [1663150288.097040][45626:45633] CHIP:TOO: device list: 2 entries + [1663150288.097069][45626:45633] CHIP:TOO: [1]: { + [1663150288.097090][45626:45633] CHIP:TOO: Type: 770 + [1663150288.097109][45626:45633] CHIP:TOO: Revision: 1 + [1663150288.097127][45626:45633] CHIP:TOO: } + [1663150288.097152][45626:45633] CHIP:TOO: [2]: { + [1663150288.097170][45626:45633] CHIP:TOO: Type: 19 + [1663150288.097187][45626:45633] CHIP:TOO: Revision: 1 + [1663150288.097205][45626:45633] CHIP:TOO: } + ./chip-tool descriptor read device-list 1 6 diff --git a/src/app/tests/suites/certification/Test_TC_BR_4.yaml b/src/app/tests/suites/certification/Test_TC_BR_4.yaml index 526df3b1aa8e6b..9c1bfb0836f417 100644 --- a/src/app/tests/suites/certification/Test_TC_BR_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_BR_4.yaml @@ -1900,26 +1900,28 @@ tests: Verify on TH(bridge-app) Log: - [1659973227.630446][3652:3652] CHIP:IM: Received Read request - [1659973227.630527][3652:3652] CHIP:DMG: ReadRequestMessage = - [1659973227.630570][3652:3652] CHIP:DMG: { - [1659973227.630594][3652:3652] CHIP:DMG: AttributePathIBs = - [1659973227.630633][3652:3652] CHIP:DMG: [ - [1659973227.630658][3652:3652] CHIP:DMG: AttributePathIB = - [1659973227.630699][3652:3652] CHIP:DMG: { - [1659973227.630728][3652:3652] CHIP:DMG: Endpoint = 0x4, - [1659973227.630779][3652:3652] CHIP:DMG: Cluster = 0x402, - [1659973227.630821][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, - [1659973227.630853][3652:3652] CHIP:DMG: } - [1659973227.630892][3652:3652] CHIP:DMG: - [1659973227.630919][3652:3652] CHIP:DMG: ], - [1659973227.630957][3652:3652] CHIP:DMG: - [1659973227.630984][3652:3652] CHIP:DMG: isFabricFiltered = true, - [1659973227.631020][3652:3652] CHIP:DMG: InteractionModelRevision = 1 - [1659973227.631044][3652:3652] CHIP:DMG: }, - [1659973227.631126][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659973227.631231][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659973227.631262][3652:3652] CHIP:DMG: Cluster 402, Attribute 0 is dirty + [1663150444.546356][3294:3294] CHIP:IM: Received Read request + [1663150444.546475][3294:3294] CHIP:DMG: ReadRequestMessage = + [1663150444.546520][3294:3294] CHIP:DMG: { + [1663150444.546556][3294:3294] CHIP:DMG: AttributePathIBs = + [1663150444.546604][3294:3294] CHIP:DMG: [ + [1663150444.546646][3294:3294] CHIP:DMG: AttributePathIB = + [1663150444.546784][3294:3294] CHIP:DMG: { + [1663150444.546836][3294:3294] CHIP:DMG: Endpoint = 0x9, + [1663150444.546890][3294:3294] CHIP:DMG: Cluster = 0x2f, + [1663150444.546945][3294:3294] CHIP:DMG: Attribute = 0x0000_000E, + [1663150444.546996][3294:3294] CHIP:DMG: } + [1663150444.547047][3294:3294] CHIP:DMG: + [1663150444.547094][3294:3294] CHIP:DMG: ], + [1663150444.547142][3294:3294] CHIP:DMG: + [1663150444.547190][3294:3294] CHIP:DMG: isFabricFiltered = true, + [1663150444.547233][3294:3294] CHIP:DMG: InteractionModelRevision = 1 + [1663150444.547273][3294:3294] CHIP:DMG: }, + [1663150444.547388][3294:3294] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663150444.547520][3294:3294] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663150444.547568][3294:3294] CHIP:DMG: Cluster 2f, Attribute e is dirty + [1663150444.547603][3294:3294] CHIP:DMG: Reading attribute: Cluster=0x0000_002F Endpoint=9 AttributeId=0x0000_000E (expanded=0) + [1663150444.547647][3294:3294 disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml index bb99e0d88ac3b9..5458b1bec42e47 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml @@ -102,7 +102,7 @@ tests: CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1649756670.402192][10794:10799] CHIP:CTL: Device returned status 5 on receiving the NOC [1649756670.402221][10794:10799] CHIP:CTL: Add NOC failed with error ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1110: CHIP Error 0x0000000B: No memory - [1649756670.402241][10794:10799] CHIP:CTL: Failed to perform commissioning step 12 + [1649756670.402241][10794:10799] CHIP:CTL: Failed to perform commissioning step 13 disabled: true - label: "TH_CR1 removes FabricIndex1" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml index e723b6d8694234..f61c2d425265ad 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml @@ -122,7 +122,7 @@ tests: CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1649756670.402192][10794:10799] CHIP:CTL: Device returned status 5 on receiving the NOC [1649756670.402221][10794:10799] CHIP:CTL: Add NOC failed with error ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1110: CHIP Error 0x0000000B: No memory - [1649756670.402241][10794:10799] CHIP:CTL: Failed to perform commissioning step 12 + [1649756670.402241][10794:10799] CHIP:CTL: Failed to perform commissioning step 13 disabled: true - label: "TH_CR1 removes FabricIndex1" diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml index d8acbf87ed991d..2ecdbaf1a3773d 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml @@ -39,7 +39,7 @@ tests: disabled: true - label: "DUT sends MoveToHue command to TH" - PICS: CC.C.C00.Rsp + PICS: CC.C.C00.Tx verification: | ./chip-tool colorcontrol move-to-hue 1 0 300 0 0 1 1 @@ -81,7 +81,7 @@ tests: - label: "DUT reads CurrentHue attribute from TH (potentially multiple times)" - PICS: CC.C.C00.Rsp && CC.C.A0000 + PICS: CC.C.C00.Tx && CC.C.A0000 verification: | ./chip-tool colorcontrol read current-hue 1 1 @@ -113,7 +113,7 @@ tests: disabled: true - label: "DUT sends MoveHue command to TH" - PICS: CC.C.C01.Rsp + PICS: CC.C.C01.Tx verification: | ./chip-tool colorcontrol move-hue 1 10 0 0 1 1 @@ -153,7 +153,7 @@ tests: disabled: true - label: "DUT reads CurrentHue attribute (potentially multiple times)" - PICS: CC.C.C01.Rsp && CC.C.A0000 + PICS: CC.C.C01.Tx && CC.C.A0000 verification: | ./chip-tool colorcontrol read current-hue 1 1 @@ -187,7 +187,7 @@ tests: disabled: true - label: "DUT sends StepHue command to TH" - PICS: CC.C.C02.Rsp + PICS: CC.C.C02.Tx verification: | ./chip-tool colorcontrol step-hue 1 10 200 0 0 1 1 @@ -230,7 +230,7 @@ tests: - label: "DUT reads CurrentHue attribute from TH (potentially multiple times)" - PICS: CC.C.C02.Rsp && CC.C.A0000 + PICS: CC.C.C02.Tx && CC.C.A0000 verification: | ./chip-tool colorcontrol read current-hue 1 1 @@ -263,7 +263,7 @@ tests: disabled: true - label: "DUT sends StopMoveStep command to TH." - PICS: CC.C.C47.Rsp + PICS: CC.C.C47.Tx verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 @@ -301,7 +301,7 @@ tests: disabled: true - label: "Over TransitionTime, DUT reads CurrentHue attribute from TH." - PICS: CC.C.C47.Rsp && CC.C.A0000 + PICS: CC.C.C47.Tx && CC.C.A0000 verification: | ./chip-tool colorcontrol read current-hue 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_5.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_5.yaml index f50ceb4342d9ec..9846bd5b49d83e 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_5.yaml @@ -39,7 +39,7 @@ tests: disabled: true - label: "DUT sends MoveToSaturation command to TH" - PICS: CC.C.C03.Rsp + PICS: CC.C.C03.Tx verification: | ./chip-tool colorcontrol move-to-saturation 200 300 0 0 1 1 @@ -82,7 +82,7 @@ tests: - label: "DUT reads CurrentSaturation attribute from TH (potentially multiple times)" - PICS: CC.C.C03.Rsp && CC.C.A0001 + PICS: CC.C.C03.Tx && CC.C.A0001 verification: | ./chip-tool colorcontrol read current-saturation 1 1 @@ -116,7 +116,7 @@ tests: disabled: true - label: "DUT sends MoveSaturation command to TH" - PICS: CC.C.C04.Rsp + PICS: CC.C.C04.Tx verification: | ./chip-tool colorcontrol move-saturation 1 10 0 0 1 1 @@ -159,7 +159,7 @@ tests: - label: "DUT reads CurrentSaturation attribute (potentially multiple times)" - PICS: CC.C.C04.Rsp && CC.C.A0001 + PICS: CC.C.C04.Tx && CC.C.A0001 verification: | ./chip-tool colorcontrol read current-saturation 1 1 @@ -193,7 +193,7 @@ tests: disabled: true - label: "DUT sends StepSaturation command to TH" - PICS: CC.C.C05.Rsp + PICS: CC.C.C05.Tx verification: | ./chip-tool colorcontrol step-saturation 1 10 200 0 0 1 1 @@ -236,7 +236,7 @@ tests: - label: "DUT reads CurrentSaturation attribute from TH (potentially multiple times)" - PICS: CC.C.C05.Rsp && CC.C.A0001 + PICS: CC.C.C05.Tx && CC.C.A0001 verification: | ./chip-tool colorcontrol read current-saturation 1 1 @@ -268,7 +268,7 @@ tests: disabled: true - label: "DUT sends MoveToHueAndSaturation command to TH" - PICS: CC.C.C06.Rsp + PICS: CC.C.C06.Tx verification: | ./chip-tool colorcontrol move-to-hue-and-saturation 100 200 200 0 0 1 1 @@ -312,7 +312,7 @@ tests: - label: "DUT reads CurrentHue and CurrentSaturation attributes from TH (potentially multiple times)" - PICS: CC.C.C06.Rsp && CC.C.A0000 && CC.C.A0001 + PICS: CC.C.C06.Tx && CC.C.A0000 && CC.C.A0001 verification: | ./chip-tool colorcontrol read current-hue 1 1 @@ -377,7 +377,7 @@ tests: disabled: true - label: "DUT sends StopMoveStep command to TH." - PICS: CC.C.C47.Rsp + PICS: CC.C.C47.Tx verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 @@ -416,7 +416,7 @@ tests: - label: "Over TransitionTime, DUT reads CurrentSaturation attribute from TH." - PICS: CC.C.C47.Rsp && CC.C.A0001 + PICS: CC.C.C47.Tx && CC.C.A0001 verification: | ./chip-tool colorcontrol read current-saturation 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_4.yaml index 3616dce7a1667f..f4df770cc02415 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_4.yaml @@ -39,7 +39,7 @@ tests: disabled: true - label: "DUT sends MoveToColor command to TH" - PICS: CC.C.C07.Rsp + PICS: CC.C.C07.Tx verification: | ./chip-tool colorcontrol move-to-color 400 500 300 0 0 1 1 @@ -82,7 +82,7 @@ tests: - label: "DUT reads CurrentX and CurrentY attributes from TH (potentially multiple times)" - PICS: CC.C.C07.Rsp && CC.C.A0003 && CC.C.A0004 + PICS: CC.C.C07.Tx && CC.C.A0003 && CC.C.A0004 verification: | ./chip-tool colorcontrol read current-x 1 1 @@ -144,7 +144,7 @@ tests: disabled: true - label: "DUT sends MoveColor command to TH" - PICS: CC.C.C08.Rsp + PICS: CC.C.C08.Tx verification: | ./chip-tool colorcontrol move-color 10 20 0 0 1 1 Verify success response in TH(all-clusters-app) Log: @@ -185,7 +185,7 @@ tests: - label: "DUT reads CurrentX and CurrentY attributes from TH (potentially multiple times)" - PICS: CC.C.C08.Rsp && CC.C.A0003 && CC.C.A0004 + PICS: CC.C.C08.Tx && CC.C.A0003 && CC.C.A0004 verification: | ./chip-tool colorcontrol read current-x 1 1 @@ -247,7 +247,7 @@ tests: disabled: true - label: "DUT sends StepColor command to TH" - PICS: CC.C.C09.Rsp + PICS: CC.C.C09.Tx verification: | ./chip-tool colorcontrol step-color 100 100 200 0 0 1 1 @@ -289,7 +289,7 @@ tests: - label: "DUT reads CurrentX and CurrentY attributes from TH (potentially multiple times)" - PICS: CC.C.C09.Rsp && CC.C.A0003 && CC.C.A0004 + PICS: CC.C.C09.Tx && CC.C.A0003 && CC.C.A0004 verification: | ./chip-tool colorcontrol read current-x 1 1 @@ -353,7 +353,7 @@ tests: disabled: true - label: "DUT sends StopMoveStep command to TH." - PICS: CC.C.C47.Rsp + PICS: CC.C.C47.Tx verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 @@ -393,7 +393,7 @@ tests: - label: "DUT reads CurrentX and CurrentY attributes from TH (potentially multiple times)" - PICS: CC.C.C47.Rsp && CC.C.A0003 && CC.C.A0004 + PICS: CC.C.C47.Tx && CC.C.A0003 && CC.C.A0004 verification: | ./chip-tool colorcontrol read current-x 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml index 734c0d62d389ba..b3053808dc4c51 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml @@ -105,7 +105,7 @@ tests: disabled: true - label: "DUT sends MoveToColorTemperature command to TH" - PICS: CC.C.C0a.Rsp + PICS: CC.C.C0a.Tx verification: | ./chip-tool colorcontrol move-to-color-temperature 150 300 0 0 1 1 @@ -147,7 +147,7 @@ tests: - label: "DUT reads ColorTemperatureMired attribute from TH (potentially multiple times)" - PICS: CC.C.C0a.Rsp && CC.C.A0007 + PICS: CC.C.C0a.Tx && CC.C.A0007 verification: | ./chip-tool colorcontrol read color-temperature 1 1 @@ -178,7 +178,7 @@ tests: disabled: true - label: "DUT sends MoveColorTemperature command to TH" - PICS: CC.C.C4b.Rsp + PICS: CC.C.C4b.Tx verification: | ./chip-tool colorcontrol move-color-temperature 1 16319 0 65279 0 0 1 1 @@ -229,7 +229,7 @@ tests: - label: "DUT reads ColorTemperatureMired attribute from TH (potentially multiple times)" - PICS: CC.C.C4b.Rsp && CC.C.A0007 + PICS: CC.C.C4b.Tx && CC.C.A0007 verification: | ./chip-tool colorcontrol read color-temperature 1 1 @@ -261,7 +261,7 @@ tests: disabled: true - label: "DUT sends StepColorTemperature command to TH" - PICS: CC.C.C4c.Rsp + PICS: CC.C.C4c.Tx verification: | ./chip-tool colorcontrol step-color-temperature 1 32639 200 0 65279 0 0 1 1 @@ -313,7 +313,7 @@ tests: - label: "DUT reads ColorTemperatureMired attribute from TH (potentially multiple times)" - PICS: CC.C.C4c.Rsp & CC.C.A0007 + PICS: CC.C.C4c.Tx & CC.C.A0007 verification: | ./chip-tool colorcontrol read color-temperature 1 1 Verify response contains an ColorTemperatureMireds in TH(all-clusters-app) Logs: @@ -342,7 +342,7 @@ tests: disabled: true - label: "DUT sends StopMoveStep command to TH." - PICS: CC.C.C47.Rsp + PICS: CC.C.C47.Tx verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 @@ -388,7 +388,7 @@ tests: - label: "DUT reads ColorTemperatureMired attribute from TH (potentially multiple times)" - PICS: CC.C.C47.Rsp && CC.C.A0007 + PICS: CC.C.C47.Tx && CC.C.A0007 verification: | ./chip-tool colorcontrol read color-temperature 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml index ef66c12d3ea3fa..ccbdc1c1500bae 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml @@ -39,7 +39,7 @@ tests: disabled: true - label: "DUT sends EnhancedMoveToHue command to TH" - PICS: CC.C.C40.Rsp + PICS: CC.C.C40.Tx verification: | ./chip-tool colorcontrol enhanced-move-to-hue 1000 3 200 0 0 1 1 @@ -81,7 +81,7 @@ tests: - label: "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)" - PICS: CC.C.C40.Rsp && CC.C.A4000 + PICS: CC.C.C40.Tx && CC.C.A4000 verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 @@ -114,7 +114,7 @@ tests: disabled: true - label: "DUT sends EnhancedMoveHue command to TH" - PICS: CC.C.C41.Rsp + PICS: CC.C.C41.Tx verification: | ./chip-tool colorcontrol enhanced-move-hue 0 100 0 0 1 1 @@ -156,7 +156,7 @@ tests: - label: "DUT reads EnhancedCurrentHue attribute (potentially multiple times)" - PICS: CC.C.C41.Rsp && CC.C.A4000 + PICS: CC.C.C41.Tx && CC.C.A4000 verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 @@ -188,7 +188,7 @@ tests: disabled: true - label: "DUT sends EnhancedStepHue command to TH" - PICS: CC.C.C42.Rsp + PICS: CC.C.C42.Tx verification: | ./chip-tool colorcontrol enhanced-step-hue 1 1000 200 0 0 1 1 @@ -230,7 +230,7 @@ tests: - label: "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)" - PICS: CC.C.C42.Rsp && CC.C.A4000 + PICS: CC.C.C42.Tx && CC.C.A4000 verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 @@ -262,7 +262,7 @@ tests: disabled: true - label: "DUT sends EnhancedMoveToHueAndSaturation command to TH" - PICS: CC.C.C43.Rsp + PICS: CC.C.C43.Tx verification: | ./chip-tool colorcontrol enhanced-move-to-hue-and-saturation 2500 100 200 0 0 1 1 @@ -305,7 +305,7 @@ tests: - label: "DUT reads EnhancedCurrentHue and CurrentSaturation attributes from TH (potentially multiple times)" - PICS: CC.C.C43.Rsp && CC.C.A4000 && CC.C.A0001 + PICS: CC.C.C43.Tx && CC.C.A4000 && CC.C.A0001 verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 @@ -338,7 +338,7 @@ tests: disabled: true - label: "DUT sends StopMoveStep command to TH." - PICS: CC.C.C47.Rsp + PICS: CC.C.C47.Tx verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 @@ -377,7 +377,7 @@ tests: - label: "Over TransitionTime, DUT reads EnhancedCurrentHue attribute from TH." - PICS: CC.C.C47.Rsp && CC.C.A4000 + PICS: CC.C.C47.Tx && CC.C.A4000 verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_4.yaml index 21314bcbb1450f..c490980b4a6dce 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_4.yaml @@ -37,7 +37,7 @@ tests: disabled: true - label: "DUT sends ColorLoopSet command to TH." - PICS: CC.C.C44.Rsp + PICS: CC.C.C44.Tx verification: | ./chip-tool colorcontrol color-loop-set 15 0 0 30 160 0 0 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_CHANNEL_5_5.yaml b/src/app/tests/suites/certification/Test_TC_CHANNEL_5_5.yaml index d984e27acf0d45..6b15fad2bcc826 100644 --- a/src/app/tests/suites/certification/Test_TC_CHANNEL_5_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CHANNEL_5_5.yaml @@ -40,7 +40,7 @@ tests: ./chip-tool channel read channel-list 1 1 - By sending above command user can select the MajorNumber and MinorNumber instead 9 1 which are listed in chanel list + By sending above command user can select the MajorNumber and MinorNumber instead of 9 1 which are listed in chanel list. ./chip-tool channel change-channel-by-number 9 1 1 1 ./chip-tv-casting-app channel change-channel-by-number 9 1 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_1.yaml index 1b59e9c270242c..e4f6da9009b013 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_1.yaml @@ -28,12 +28,13 @@ config: tests: - label: "Commission DUT to TH1s Fabric" verification: | - sudo ./chip-all-clusters-app --wifi + execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT + ./chip-all-clusters-app - ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 --trace_decode 1 - - Verify in TH log: + Once DUT reach the commissionable state pls send below mentioned command on TH2. Pls use equivalent command on the respective DUT + ./chip-tool pairing onnetwork 1 20202021 + Verify the commissioning completed with success on TH1(chip-tool) from DUT [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml index c02101c86ed49e..9a48e3588b20bb 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml @@ -36,6 +36,10 @@ tests: 1 - 5.4.3. Discovery by Commissioner - DUT supports BLE (central role), Wi-Fi and IP connectivity - Wi-Fi certified n client 2 - Test Harness must support all discovery transport technologies as the DUT (i.e. BLE, Wi-Fi and IP connectivity) + + To put the DUT into commissionable state and verify commissionable state. + This step is same in couple of other cases (like DD) so use the same verification method here too i.e. if your DUT is discoverable over mDNS then use "chiptool discover commissionables" to discover mDNS adv and provision the device using "chip-tool pairing code node-id payload". + otherwise if your DUT is advertising over BLE , pls use the "/chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 --trace_decode 1" command to discover and provision the device (BTW the SSID , passwd, descriminator ..etc are configurable parameters for your DUT) disabled: true - label: "TH starts matter announcement procedure using BLE transport" @@ -69,14 +73,14 @@ tests: verification: | 1. Discover commissionables over BLE using DUT=chip-tool pairing - Verify in TH as commissionee side: + Verify in TH as commissioner side: $ ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 [1651743342.299897][3461:3464] CHIP:BLE: New device scanned: E4:5F:01:0F:1A:02 [1651743342.299951][3461:3464] CHIP:BLE: Device discriminator match. Attempting to connect. [1651743342.303783][3461:3464] CHIP:BLE: Scan complete notification without an active scan. [1651743346.244175][3461:3464] CHIP:DL: ConnectDevice complete - Verify in DUT as commissioner side: + Verify in DUT as commissionee side: [1651743346.152716][5072:5075] CHIP:DL: Device E4:5F:01:0F:3B:B1 (Path: /org/bluez/hci0/dev_E4_5F_01_0F_3B_B1) Connected [1651743347.908807][5072:5075] CHIP:DL: BluezCharacteristicAcquireWrite is called, conn: 0xffffa0043700 [1651743347.911151][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 @@ -127,14 +131,14 @@ tests: verification: | 1. Discover commissionables over BLE using DUT=chip-tool pairing command - Verify in TH as commissionee side: + Verify in TH as commissioner side: $ ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 [1651743342.299897][3461:3464] CHIP:BLE: New device scanned: E4:5F:01:0F:1A:02 [1651743342.299951][3461:3464] CHIP:BLE: Device discriminator match. Attempting to connect. [1651743342.303783][3461:3464] CHIP:BLE: Scan complete notification without an active scan. [1651743346.244175][3461:3464] CHIP:DL: ConnectDevice complete - Verify in DUT as commissioner side: + Verify in DUT as commissionee side: [1651743346.152716][5072:5075] CHIP:DL: Device E4:5F:01:0F:3B:B1 (Path: /org/bluez/hci0/dev_E4_5F_01_0F_3B_B1) Connected [1651743347.908807][5072:5075] CHIP:DL: BluezCharacteristicAcquireWrite is called, conn: 0xffffa0043700 [1651743347.911151][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 diff --git a/src/app/tests/suites/certification/Test_TC_FLW_3_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_3_1.yaml index ce6ffd38c928c9..50538c9862287b 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_3_1.yaml @@ -172,30 +172,62 @@ tests: verification: | ./chip-tool flowmeasurement read attribute-list 1 1 - Verify a list of supported attributes which contains mandatory on TH(all-clusters-minimal-app) log - - [1656478164937] [49517:5732586] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0404 Attribute 0x0000_FFFB DataVersion: 3423686907 - [1656478164937] [49517:5732586] CHIP: [TOO] AttributeList: 8 entries - [1656478164937] [49517:5732586] CHIP: [TOO] [1]: 0 - [1656478164937] [49517:5732586] CHIP: [TOO] [2]: 1 - [1656478164937] [49517:5732586] CHIP: [TOO] [3]: 2 - [1656478164937] [49517:5732586] CHIP: [TOO] [4]: 65528 - [1656478164937] [49517:5732586] CHIP: [TOO] [5]: 65529 - [1656478164937] [49517:5732586] CHIP: [TOO] [6]: 65531 - [1656478164937] [49517:5732586] CHIP: [TOO] [7]: 65532 - [1656478164937] [49517:5732586] CHIP: [TOO] [8]: 65533 + Verify DUT receives AttributeList response on the TH(all-clusters-minimal-app) Log: + + Received Read request + [1663067480.162780][4200:4200] CHIP:DMG: ReadRequestMessage = + [1663067480.162811][4200:4200] CHIP:DMG: { + [1663067480.162845][4200:4200] CHIP:DMG: AttributePathIBs = + [1663067480.162885][4200:4200] CHIP:DMG: [ + [1663067480.162912][4200:4200] CHIP:DMG: AttributePathIB = + [1663067480.162946][4200:4200] CHIP:DMG: { + [1663067480.162980][4200:4200] CHIP:DMG: Endpoint = 0x1, + [1663067480.163018][4200:4200] CHIP:DMG: Cluster = 0x404, + [1663067480.163055][4200:4200] CHIP:DMG: Attribute = 0x0000_FFFB, + [1663067480.163088][4200:4200] CHIP:DMG: } + [1663067480.163121][4200:4200] CHIP:DMG: + [1663067480.163154][4200:4200] CHIP:DMG: ], + [1663067480.163185][4200:4200] CHIP:DMG: + [1663067480.163213][4200:4200] CHIP:DMG: isFabricFiltered = true, + [1663067480.163243][4200:4200] CHIP:DMG: InteractionModelRevision = 1 + [1663067480.163268][4200:4200] CHIP:DMG: }, + [1663067480.163351][4200:4200] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663067480.163457][4200:4200] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663067480.163488][4200:4200] CHIP:DMG: Cluster 404, Attribute fffb is dirty + [1663067480.163512][4200:4200] CHIP:DMG: Reading attribute: Cluster=0x0000_0404 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) + ./chip-tool flowmeasurement read feature-map 1 1 - Verify featuremap value is 0 on TH(all-clusters-minimal-app) log + Verify DUT receives FeatureMap attribute response on the TH(all-clusters-minimal-app) Log: + + Received Read request + [1663067626.167648][4200:4200] CHIP:DMG: ReadRequestMessage = + [1663067626.167697][4200:4200] CHIP:DMG: { + [1663067626.167722][4200:4200] CHIP:DMG: AttributePathIBs = + [1663067626.167759][4200:4200] CHIP:DMG: [ + [1663067626.167788][4200:4200] CHIP:DMG: AttributePathIB = + [1663067626.167823][4200:4200] CHIP:DMG: { + [1663067626.167855][4200:4200] CHIP:DMG: Endpoint = 0x1, + [1663067626.167899][4200:4200] CHIP:DMG: Cluster = 0x404, + [1663067626.167937][4200:4200] CHIP:DMG: Attribute = 0x0000_FFFC, + [1663067626.167981][4200:4200] CHIP:DMG: } + [1663067626.168014][4200:4200] CHIP:DMG: + [1663067626.168053][4200:4200] CHIP:DMG: ], + [1663067626.168087][4200:4200] CHIP:DMG: + [1663067626.168116][4200:4200] CHIP:DMG: isFabricFiltered = true, + [1663067626.168155][4200:4200] CHIP:DMG: InteractionModelRevision = 1 + [1663067626.168181][4200:4200] CHIP:DMG: }, + [1663067626.168275][4200:4200] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663067626.168394][4200:4200] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663067626.168438][4200:4200] CHIP:DMG: Cluster 404, Attribute fffc is dirty + [1663067626.168462][4200:4200] CHIP:DMG: Reading attribute: Cluster=0x0000_0404 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1656478242820] [49526:5733040] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0404 Attribute 0x0000_FFFC DataVersion: 3423686907 - [1656478242820] [49526:5733040] CHIP: [TOO] FeatureMap: 0 - "./chip-tool flowmeasurement read measured-value 1 1 + ./chip-tool flowmeasurement read measured-value 1 1 - Verify read command is received on TH(all-clusters-minimal-app) log + Verify DUT receives MeasuredValue response on the TH(all-clusters-minimal-app) Log: [1658853801.750840][29347:29347] CHIP:IM: Received Read request [1658853801.750918][29347:29347] CHIP:DMG: ReadRequestMessage = @@ -223,9 +255,9 @@ tests: - ""./chip-tool flowmeasurement read min-measured-value 1 1 + ./chip-tool flowmeasurement read min-measured-value 1 1 - Verify read command is received on TH(all-clusters-minimal-app) log + Verify DUT receives MinMeasuredValue response on the TH(all-clusters-minimal-app) Log: [1658853849.969073][29347:29347] CHIP:IM: Received Read request [1658853849.969151][29347:29347] CHIP:DMG: ReadRequestMessage = @@ -250,9 +282,9 @@ tests: - ""./chip-tool flowmeasurement read max-measured-value 1 1 + ./chip-tool flowmeasurement read max-measured-value 1 1 - Verify read command is received on TH(all-clusters-minimal-app) log + Verify DUT receives MaxMeasured Value response on the TH(all-clusters-minimal-app) Log: [1658853898.416395][29347:29347] CHIP:IM: Received Read request [1658853898.416472][29347:29347] CHIP:DMG: ReadRequestMessage = @@ -281,11 +313,31 @@ tests: "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order" verification: | - Verify read command is received on TH(all-clusters-minimal-app) log - ./chip-tool flowmeasurement read tolerance 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + Verify DUT receives Tolerance response on the TH(all-clusters-minimal-app) Log: + + Received Read request + [1663067899.776588][4200:4200] CHIP:DMG: ReadRequestMessage = + [1663067899.776657][4200:4200] CHIP:DMG: { + [1663067899.776715][4200:4200] CHIP:DMG: AttributePathIBs = + [1663067899.776792][4200:4200] CHIP:DMG: [ + [1663067899.776849][4200:4200] CHIP:DMG: AttributePathIB = + [1663067899.776929][4200:4200] CHIP:DMG: { + [1663067899.777008][4200:4200] CHIP:DMG: Endpoint = 0x1, + [1663067899.777083][4200:4200] CHIP:DMG: Cluster = 0x404, + [1663067899.777163][4200:4200] CHIP:DMG: Attribute = 0x0000_0003, + [1663067899.777247][4200:4200] CHIP:DMG: } + [1663067899.777326][4200:4200] CHIP:DMG: + [1663067899.777397][4200:4200] CHIP:DMG: ], + [1663067899.777467][4200:4200] CHIP:DMG: + [1663067899.777533][4200:4200] CHIP:DMG: isFabricFiltered = true, + [1663067899.777596][4200:4200] CHIP:DMG: InteractionModelRevision = 1 + [1663067899.777654][4200:4200] CHIP:DMG: }, + [1663067899.777873][4200:4200] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663067899.778081][4200:4200] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663067899.778151][4200:4200] CHIP:DMG: Cluster 404, Attribute 3 is dirty + [1663067899.778209][4200:4200] CHIP:DMG: Reading attribute: Cluster=0x0000_0404 Endpoint=1 AttributeId=0x0000_0003 (expanded=0) disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_G_3_2.yaml b/src/app/tests/suites/certification/Test_TC_G_3_2.yaml index ce50bdaa67601a..3a3180a56245f7 100644 --- a/src/app/tests/suites/certification/Test_TC_G_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_3_2.yaml @@ -92,7 +92,7 @@ tests: Before adding the Group 0x0002,0x0003 execute this command in DUT - ../chip-tool groupkeymanagement write group-key-map "[{"groupId":2, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 3, "groupKeySetID": 1,"fabricIndex": 1} ]" 1 0 + ./chip-tool groupkeymanagement write group-key-map "[{"groupId":2, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 3, "groupKeySetID": 1,"fabricIndex": 1} ]" 1 0 Verify the command response in TH (all-Clusters-app) log @@ -159,6 +159,73 @@ tests: [1662658902.326776][231145:231145] CHIP:DMG: AccessControl: allowed + ./chip-tool groups add-group 0x0002 gp2 1 1 + + Verify the command response in TH (all-Clusters-app) log + + [1663135868.553238][326599:326599] CHIP:DMG: InvokeRequestMessage = + [1663135868.553242][326599:326599] CHIP:DMG: { + [1663135868.553245][326599:326599] CHIP:DMG: suppressResponse = false, + [1663135868.553249][326599:326599] CHIP:DMG: timedRequest = false, + [1663135868.553252][326599:326599] CHIP:DMG: InvokeRequests = + [1663135868.553257][326599:326599] CHIP:DMG: [ + [1663135868.553261][326599:326599] CHIP:DMG: CommandDataIB = + [1663135868.553266][326599:326599] CHIP:DMG: { + [1663135868.553269][326599:326599] CHIP:DMG: CommandPathIB = + [1663135868.553273][326599:326599] CHIP:DMG: { + [1663135868.553276][326599:326599] CHIP:DMG: EndpointId = 0x1, + [1663135868.553280][326599:326599] CHIP:DMG: ClusterId = 0x4, + [1663135868.553284][326599:326599] CHIP:DMG: CommandId = 0x0, + [1663135868.553287][326599:326599] CHIP:DMG: }, + [1663135868.553291][326599:326599] CHIP:DMG: + [1663135868.553294][326599:326599] CHIP:DMG: CommandFields = + [1663135868.553298][326599:326599] CHIP:DMG: { + [1663135868.553303][326599:326599] CHIP:DMG: 0x0 = 2, + [1663135868.553307][326599:326599] CHIP:DMG: 0x1 = "gp2" (3 chars), + [1663135868.553311][326599:326599] CHIP:DMG: }, + [1663135868.553313][326599:326599] CHIP:DMG: }, + [1663135868.553318][326599:326599] CHIP:DMG: + [1663135868.553320][326599:326599] CHIP:DMG: ], + [1663135868.553325][326599:326599] CHIP:DMG: + [1663135868.553328][326599:326599] CHIP:DMG: InteractionModelRevision = 1 + [1663135868.553331][326599:326599] CHIP:DMG: }, + [1663135868.553347][326599:326599] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0004 e=1 p=m + [1663135868.553353][326599:326599] CHIP:DMG: AccessControl: allowed + + + ./chip-tool groups add-group 0x0003 gp3 1 1 + + Verify the command response in TH (all-Clusters-app) log + + [1663135947.996375][326599:326599] CHIP:DMG: InvokeRequestMessage = + [1663135947.996379][326599:326599] CHIP:DMG: { + [1663135947.996382][326599:326599] CHIP:DMG: suppressResponse = false, + [1663135947.996385][326599:326599] CHIP:DMG: timedRequest = false, + [1663135947.996388][326599:326599] CHIP:DMG: InvokeRequests = + [1663135947.996394][326599:326599] CHIP:DMG: [ + [1663135947.996397][326599:326599] CHIP:DMG: CommandDataIB = + [1663135947.996400][326599:326599] CHIP:DMG: { + [1663135947.996403][326599:326599] CHIP:DMG: CommandPathIB = + [1663135947.996407][326599:326599] CHIP:DMG: { + [1663135947.996411][326599:326599] CHIP:DMG: EndpointId = 0x1, + [1663135947.996414][326599:326599] CHIP:DMG: ClusterId = 0x4, + [1663135947.996418][326599:326599] CHIP:DMG: CommandId = 0x0, + [1663135947.996421][326599:326599] CHIP:DMG: }, + [1663135947.996425][326599:326599] CHIP:DMG: + [1663135947.996428][326599:326599] CHIP:DMG: CommandFields = + [1663135947.996432][326599:326599] CHIP:DMG: { + [1663135947.996436][326599:326599] CHIP:DMG: 0x0 = 3, + [1663135947.996440][326599:326599] CHIP:DMG: 0x1 = "gp3" (3 chars), + [1663135947.996444][326599:326599] CHIP:DMG: }, + [1663135947.996447][326599:326599] CHIP:DMG: }, + [1663135947.996451][326599:326599] CHIP:DMG: + [1663135947.996454][326599:326599] CHIP:DMG: ], + [1663135947.996459][326599:326599] CHIP:DMG: + [1663135947.996462][326599:326599] CHIP:DMG: InteractionModelRevision = 1 + [1663135947.996465][326599:326599] CHIP:DMG: }, + [1663135947.996481][326599:326599] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0004 e=1 p=m + [1663135947.996488][326599:326599] CHIP:DMG: AccessControl: allowed + [1663135947.996493][326599:326599] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0004 Command=0x0000_0000 Execute the below command before adding the Group0x0004 execute this command in step-4. @@ -210,6 +277,39 @@ tests: [1662658956.898277][231145:231145] CHIP:DMG: InteractionModelRevision = 1 [1662658956.898278][231145:231145] CHIP:DMG: }, [1662658956.898293][231145:231145] CHIP:DMG: AccessControl: checking + + ./chip-tool groups add-group 0x0004 gp4 1 1 + + Verify the command response in TH (all-Clusters-app) log + + [1663135947.996375][326599:326599] CHIP:DMG: InvokeRequestMessage = + [1663135947.996379][326599:326599] CHIP:DMG: { + [1663135947.996382][326599:326599] CHIP:DMG: suppressResponse = false, + [1663135947.996385][326599:326599] CHIP:DMG: timedRequest = false, + [1663135947.996388][326599:326599] CHIP:DMG: InvokeRequests = + [1663135947.996394][326599:326599] CHIP:DMG: [ + [1663135947.996397][326599:326599] CHIP:DMG: CommandDataIB = + [1663135947.996400][326599:326599] CHIP:DMG: { + [1663135947.996403][326599:326599] CHIP:DMG: CommandPathIB = + [1663135947.996407][326599:326599] CHIP:DMG: { + [1663135947.996411][326599:326599] CHIP:DMG: EndpointId = 0x1, + [1663135947.996414][326599:326599] CHIP:DMG: ClusterId = 0x4, + [1663135947.996418][326599:326599] CHIP:DMG: CommandId = 0x0, + [1663135947.996421][326599:326599] CHIP:DMG: }, + [1663135947.996425][326599:326599] CHIP:DMG: + [1663135947.996428][326599:326599] CHIP:DMG: CommandFields = + [1663135947.996432][326599:326599] CHIP:DMG: { + [1663135947.996436][326599:326599] CHIP:DMG: 0x0 = 4, + [1663135947.996440][326599:326599] CHIP:DMG: 0x1 = "gp4" (3 chars), + [1663135947.996444][326599:326599] CHIP:DMG: }, + [1663135947.996447][326599:326599] CHIP:DMG: }, + [1663135947.996451][326599:326599] CHIP:DMG: + [1663135947.996454][326599:326599] CHIP:DMG: ], + [1663135947.996459][326599:326599] CHIP:DMG: + [1663135947.996462][326599:326599] CHIP:DMG: InteractionModelRevision = 1 + [1663135947.996465][326599:326599] CHIP:DMG: }, + [1663135947.996481][326599:326599] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0004 e=1 p=m + [1663135947.996488][326599:326599] CHIP:DMG: AccessControl: allowed disabled: true - label: "DUT sends GetGroupMembership command to TH" diff --git a/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml index bc9c3b5dee16da..1fe257aa36c8ad 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml @@ -585,7 +585,7 @@ tests: verification: | DUT implementation required to verify read an attribute of data type Float - If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "Not Applicable" + If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "\Not Applicable\" disabled: true - label: @@ -871,24 +871,72 @@ tests: ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF The message flow can expect as mentioned below - TH -> DUT ReadRequest - DUT -> TH ReportData, not last chunk - TH -> DUT StatusResponse - Possibly repeat steps 2 & 3 a few times - DUT -> TH ReportData, last chunk, SuppressResponse set to true - TH -> DUT standalone ack - - On TH verify that The last chunked message should not receive any status response from the DUT - - [1658396687.401934][3726:3731] CHIP:DMG: - [1658396687.401958][3726:3731] CHIP:DMG: }, - [1658396687.401987][3726:3731] CHIP:DMG: - [1658396687.402010][3726:3731] CHIP:DMG: ], - [1658396687.402048][3726:3731] CHIP:DMG: - [1658396687.402072][3726:3731] CHIP:DMG: SuppressResponse = true, - [1658396687.402097][3726:3731] CHIP:DMG: InteractionModelRevision = 1 - [1658396687.402119][3726:3731] CHIP:DMG: } - [1658396687.402400][3726:3731] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_FFFB DataVersion: 3456275847 + TH(all-clusters-app) -> DUT(chip-tool) ReadRequest + DUT(chip-tool) -> TH(all-clusters-app) ReportData, not last chunk + TH (all-clusters-app)-> DUT(chip-tool) StatusResponse + Possibly DUT and TH repeat itself steps 2 & 3 a few times + DUT(chip-tool) -> TH(all-clusters-app) ReportData, last chunk, SuppressResponse set to true + TH(all-clusters-app) -> DUT(chip-tool) standalone ack + + From TH(all-clusters-app) will send read request to DUT(chip-tool), Then DUT(chip-tool) will send the report data message for the request which sent from TH(All-clusters-app), this report message keep on generating the report data until it reaches the last chuck message and for last chunk message DUT(chip-tool) will not get status response message + [1663148506.794519][39604:39604] CHIP:EM: Removed CHIP MessageCounter:119127068 from RetransTable on exchange 23857r + [1663148506.794525][39604:39604] CHIP:DMG: StatusResponseMessage = + [1663148506.794527][39604:39604] CHIP:DMG: { + [1663148506.794530][39604:39604] CHIP:DMG: Status = 0x00 (SUCCESS), + [1663148506.794533][39604:39604] CHIP:DMG: InteractionModelRevision = 1 + [1663148506.794535][39604:39604] CHIP:DMG: } + [1663148506.794538][39604:39604] CHIP:IM: Received status response, status is 0x00 (SUCCESS) + [1663148506.794542][39604:39604] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1663148506.794544][39604:39604] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663148506.794550][39604:39604] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663148506.794553][39604:39604] CHIP:DMG: Cluster 2f, Attribute fffb is dirty + [1663148506.794554][39604:39604] CHIP:DMG: Reading attribute: Cluster=0x0000_002F Endpoint=2 AttributeId=0x0000_FFFB (expanded=1) + [1663148506.794558][39604:39604] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_002F e=2 p=v + [1663148506.794561][39604:39604] CHIP:DMG: AccessControl: allowed + [1663148506.794570][39604:39604] CHIP:DMG: Cluster 406, Attribute 0 is dirty + [1663148506.794572][39604:39604] CHIP:DMG: Reading attribute: Cluster=0x0000_0406 Endpoint=2 AttributeId=0x0000_0000 (expanded=1) + [1663148506.794575][39604:39604] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0406 e=2 p=v + [1663148506.794578][39604:39604] CHIP:DMG: AccessControl: allowed + [1663148506.794583][39604:39604] CHIP:DMG: Cluster 406, Attribute 1 is dirty + [1663148506.794585][39604:39604] CHIP:DMG: Reading attribute: Cluster=0x0000_0406 Endpoint=2 AttributeId=0x0000_0001 (expanded=1) + [1663148506.794588][39604:39604] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0406 e=2 p=v + [1663148506.794591][39604:39604] CHIP:DMG: AccessControl: allowed + [1663148506.794595][39604:39604] CHIP:DMG: Cluster 406, Attribute 2 is dirty + [1663148506.794597][39604:39604] CHIP:DMG: Reading attribute: Cluster=0x0000_0406 Endpoint=2 AttributeId=0x0000_0002 (expanded=1) + [1663148506.794600][39604:39604] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0406 e=2 p=v + [1663148506.794603][39604:39604] CHIP:DMG: AccessControl: allowed + [1663148506.794607][39604:39604] CHIP:DMG: Cluster 406, Attribute fffc is dirty + [1663148506.794609][39604:39604] CHIP:DMG: Reading attribute: Cluster=0x0000_0406 Endpoint=2 AttributeId=0x0000_FFFC (expanded=1) + [1663148506.794613][39604:39604] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0406 e=2 p=v + [1663148506.794615][39604:39604] CHIP:DMG: AccessControl: allowed + [1663148506.794620][39604:39604] CHIP:DMG: Cluster 406, Attribute fffd is dirty + [1663148506.794622][39604:39604] CHIP:DMG: Reading attribute: Cluster=0x0000_0406 Endpoint=2 AttributeId=0x0000_FFFD (expanded=1) + [1663148506.794624][39604:39604] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0406 e=2 p=v + [1663148506.794626][39604:39604] CHIP:DMG: AccessControl: allowed + [1663148506.794630][39604:39604] CHIP:DMG: Cluster 406, Attribute fff8 is dirty + [1663148506.794632][39604:39604] CHIP:DMG: Reading attribute: Cluster=0x0000_0406 Endpoint=2 AttributeId=0x0000_FFF8 (expanded=1) + [1663148506.794635][39604:39604] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0406 e=2 p=v + [1663148506.794638][39604:39604] CHIP:DMG: AccessControl: allowed + [1663148506.794642][39604:39604] CHIP:DMG: Cluster 406, Attribute fff9 is dirty + [1663148506.794644][39604:39604] CHIP:DMG: Reading attribute: Cluster=0x0000_0406 Endpoint=2 AttributeId=0x0000_FFF9 (expanded=1) + [1663148506.794647][39604:39604] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0406 e=2 p=v + [1663148506.794650][39604:39604] CHIP:DMG: AccessControl: allowed + [1663148506.794653][39604:39604] CHIP:DMG: Cluster 406, Attribute fffb is dirty + [1663148506.794655][39604:39604] CHIP:DMG: Reading attribute: Cluster=0x0000_0406 Endpoint=2 AttributeId=0x0000_FFFB (expanded=1) + [1663148506.794657][39604:39604] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0406 e=2 p=v + [1663148506.794660][39604:39604] CHIP:DMG: AccessControl: allowed + [1663148506.794671][39604:39604] CHIP:DMG: Sending report (payload has 626 bytes)... + [1663148506.794675][39604:39604] CHIP:EM: Piggybacking Ack for MessageCounter:219862429 on exchange: 23857r + [1663148506.794682][39604:39604] CHIP:IN: Prepared secure message 0x56076c430da8 to 0x000000000001B669 (1) of type 0x5 and protocolId (0, 1) on exchange 23857r with MessageCounter:119127069. + [1663148506.794686][39604:39604] CHIP:IN: Sending encrypted msg 0x56076c430da8 with MessageCounter:119127069 to 0x000000000001B669 (1) at monotonic time: 000000000279FAAD msec + [1663148506.794700][39604:39604] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1663148506.794703][39604:39604] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages + [1663148506.794705][39604:39604] CHIP:DMG: IM RH moving to [AwaitingDestruction] + [1663148506.794710][39604:39604] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet + [1663148506.796418][39604:39604] CHIP:EM: Received message of type 0x10 with protocolId (0, 0) and MessageCounter:219862430 on exchange 23857r + [1663148506.796422][39604:39604] CHIP:EM: Found matching exchange: 23857r, Delegate: (nil) + [1663148506.796427][39604:39604] CHIP:EM: Rxd Ack; Removing MessageCounter:119127069 from Retrans Table on exchange 23857r + [1663148506.796429][39604:39604] CHIP:EM: Removed CHIP MessageCounter:119127069 from RetransTable on exchange 23857r disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml index eb766a273d658d..e5651a7e5bf8e1 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml @@ -878,52 +878,57 @@ tests: the path." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. - Please run this test in chip tool interactive mode ./chip-tool interactive start - - - To Setup the TH(chip-tool) such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command - Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + #1:- Please run this test in chip tool interactive mode ./chip-tool interactive start - accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 + #2:- To Setup the TH(chip-tool) such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for ACL cluster(31), So except ACL cluster command if try to send any other command will get status as unsupported access. - basic subscribe-event-by-id 0x000 100 1000 1 0 - on TH(chip-tool) verify DUT responds with UNSUPPORTED_ACCESS for the data sent in the above command + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects":[1,112233], "targets": [{ "cluster":31, "endpoint":0, "deviceType":null }]}]' 1 0 - [1653479886.551289][22629:22634] CHIP:DMG: ReportDataMessage = - [1653479886.551299][22629:22634] CHIP:DMG: { - [1653479886.551308][22629:22634] CHIP:DMG: SubscriptionId = 0xf5695d45, - [1653479886.551316][22629:22634] CHIP:DMG: EventReportIBs = - [1653479886.551330][22629:22634] CHIP:DMG: [ - [1653479886.551338][22629:22634] CHIP:DMG: EventReportIB = - [1653479886.551352][22629:22634] CHIP:DMG: { - [1653479886.551373][22629:22634] CHIP:DMG: EventStatusIB = - [1653479886.551378][22629:22634] CHIP:DMG: { - [1653479886.551382][22629:22634] CHIP:DMG: EventPath = - [1653479886.551387][22629:22634] CHIP:DMG: { - [1653479886.551391][22629:22634] CHIP:DMG: Endpoint = 0x0, - [1653479886.551397][22629:22634] CHIP:DMG: Cluster = 0x28, - [1653479886.551412][22629:22634] CHIP:DMG: Event = 0x0, - [1653479886.551420][22629:22634] CHIP:DMG: }, - [1653479886.551431][22629:22634] CHIP:DMG: - [1653479886.551438][22629:22634] CHIP:DMG: StatusIB = - [1653479886.551446][22629:22634] CHIP:DMG: { - [1653479886.551454][22629:22634] CHIP:DMG: status = 0x7e (UNSUPPORTED_ACCESS), - [1653479886.551462][22629:22634] CHIP:DMG: }, - [1653479886.551471][22629:22634] CHIP:DMG: - [1653479886.551477][22629:22634] CHIP:DMG: }, - [1653479886.551487][22629:22634] CHIP:DMG: - [1653479886.551495][22629:22634] CHIP:DMG: }, - [1653479886.551506][22629:22634] CHIP:DMG: - [1653479886.551513][22629:22634] CHIP:DMG: ], - [1653479886.551524][22629:22634] CHIP:DMG: - [1653479886.551532][22629:22634] CHIP:DMG: InteractionModelRevision = 1 - [1653479886.551538][22629:22634] CHIP:DMG: } - [1653479886.551583][22629:22634] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + #3:- basic subscribe-event-by-id 0x000 100 1000 1 0 + on TH(chip-tool) verify DUT responds with UNSUPPORTED_ACCESS for the data sent in the above command - With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. + [1663151225.226869][41115:41120] CHIP:DMG: ReportDataMessage = + [1663151225.226879][41115:41120] CHIP:DMG: { + [1663151225.226890][41115:41120] CHIP:DMG: SubscriptionId = 0xd7d61f38, + [1663151225.226899][41115:41120] CHIP:DMG: EventReportIBs = + [1663151225.226915][41115:41120] CHIP:DMG: [ + [1663151225.226923][41115:41120] CHIP:DMG: EventReportIB = + [1663151225.226939][41115:41120] CHIP:DMG: { + [1663151225.226948][41115:41120] CHIP:DMG: EventStatusIB = + [1663151225.226960][41115:41120] CHIP:DMG: { + [1663151225.226977][41115:41120] CHIP:DMG: EventPath = + [1663151225.226989][41115:41120] CHIP:DMG: { + [1663151225.227000][41115:41120] CHIP:DMG: Endpoint = 0x0, + [1663151225.227014][41115:41120] CHIP:DMG: Cluster = 0x28, + [1663151225.227022][41115:41120] CHIP:DMG: Event = 0x0, + [1663151225.227030][41115:41120] CHIP:DMG: }, + [1663151225.227041][41115:41120] CHIP:DMG: + [1663151225.227049][41115:41120] CHIP:DMG: StatusIB = + [1663151225.227058][41115:41120] CHIP:DMG: { + [1663151225.227079][41115:41120] CHIP:DMG: status = 0x7e (UNSUPPORTED_ACCESS), + [1663151225.227090][41115:41120] CHIP:DMG: }, + [1663151225.227099][41115:41120] CHIP:DMG: + [1663151225.227105][41115:41120] CHIP:DMG: }, + [1663151225.227115][41115:41120] CHIP:DMG: + [1663151225.227122][41115:41120] CHIP:DMG: }, + [1663151225.227132][41115:41120] CHIP:DMG: + [1663151225.227138][41115:41120] CHIP:DMG: ], + [1663151225.227149][41115:41120] CHIP:DMG: + [1663151225.227156][41115:41120] CHIP:DMG: InteractionModelRevision = 1 + [1663151225.227162][41115:41120] CHIP:DMG: } + [1663151225.227206][41115:41120] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + [1663151225.227226][41115:41120] CHIP:DMG: MoveToState ReadClient[0x7f52100258b0]: Moving to [AwaitingSu] + + + + + + With the ACL command in step-2, we are overwriting the default privilege that chip-tool has an admin. After this step-3 you need to send below mentioned command to Grant access to all clusters again. + accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode":2, "subjects":[112233], "targets":null}]" 1 0 disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_ILL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_ILL_3_1.yaml index 830f81e07c6ac7..6fab3293e7d9b6 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_3_1.yaml @@ -181,6 +181,63 @@ tests: verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + ./chip-tool illuminancemeasurement read attribute-list 1 1 + + Verify DUT receives AttributeList response on the TH(all-clusters-minimal-app) Log: + Received Read request + [1663070306.262953][4422:4422] CHIP:DMG: ReadRequestMessage = + [1663070281.411639][4422:4422] CHIP:DMG: { + [1663070281.411663][4422:4422] CHIP:DMG: AttributePathIBs = + [1663070281.411698][4422:4422] CHIP:DMG: [ + [1663070281.411724][4422:4422] CHIP:DMG: AttributePathIB = + [1663070281.411757][4422:4422] CHIP:DMG: { + [1663070281.411794][4422:4422] CHIP:DMG: Endpoint = 0x1, + [1663070281.411830][4422:4422] CHIP:DMG: Cluster = 0x400, + [1663070281.411865][4422:4422] CHIP:DMG: Attribute = 0x0000_FFFB, + [1663070281.411898][4422:4422] CHIP:DMG: } + [1663070281.411930][4422:4422] CHIP:DMG: + [1663070281.411962][4422:4422] CHIP:DMG: ], + [1663070281.411992][4422:4422] CHIP:DMG: + [1663070281.412021][4422:4422] CHIP:DMG: isFabricFiltered = true, + [1663070281.412051][4422:4422] CHIP:DMG: InteractionModelRevision = 1 + [1663070281.412078][4422:4422] CHIP:DMG: }, + [1663070281.412158][4422:4422] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663070281.412262][4422:4422] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663070281.412293][4422:4422] CHIP:DMG: Cluster 400, Attribute fffb is dirty + [1663070281.412317][4422:4422] CHIP:DMG: Reading attribute: Cluster=0x0000_0400 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) + [1663070281.412345][4422:4422] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0400 e=1 p=v + + + ./chip-tool illuminancemeasurement read feature-map 1 1 + + Verify DUT receives FeatureMap attribute response on the TH(all-clusters-minimal-app) Log: + Received Read request + [1663070306.262953][4422:4422] CHIP:DMG: ReadRequestMessage = + [1663070306.262953][4422:4422] CHIP:DMG: ReadRequestMessage = + [1663070306.262984][4422:4422] CHIP:DMG: { + [1663070306.263008][4422:4422] CHIP:DMG: AttributePathIBs = + [1663070306.263041][4422:4422] CHIP:DMG: [ + [1663070306.263067][4422:4422] CHIP:DMG: AttributePathIB = + [1663070306.263103][4422:4422] CHIP:DMG: { + [1663070306.263140][4422:4422] CHIP:DMG: Endpoint = 0x1, + [1663070306.263175][4422:4422] CHIP:DMG: Cluster = 0x400, + [1663070306.263212][4422:4422] CHIP:DMG: Attribute = 0x0000_FFFC, + [1663070306.263244][4422:4422] CHIP:DMG: } + [1663070306.263277][4422:4422] CHIP:DMG: + [1663070306.263307][4422:4422] CHIP:DMG: ], + [1663070306.263339][4422:4422] CHIP:DMG: + [1663070306.263370][4422:4422] CHIP:DMG: isFabricFiltered = true, + [1663070306.263399][4422:4422] CHIP:DMG: InteractionModelRevision = 1 + [1663070306.263426][4422:4422] CHIP:DMG: }, + [1663070306.263508][4422:4422] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663070306.263608][4422:4422] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663070306.263640][4422:4422] CHIP:DMG: Cluster 400, Attribute fffc is dirty + [1663070306.263663][4422:4422] CHIP:DMG: Reading attribute: Cluster=0x0000_0400 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) + [1663070306.263695][4422:4422] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0400 e=1 p=v + + + + sudo ./chip-tool illuminancemeasurement read min-measured-value 1 1 Verify DUT receives min-measured-value attribute response on the TH(all-clusters-minimal-app) Log: diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml index 77aef9ae3e41b0..0ef22f6180a4d0 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml @@ -39,7 +39,8 @@ tests: verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - ./chip-tool pairing onnetwork 1 20202021 + + ./chip-tool levelcontrol read current-level 1 1 Verify DUT receives current-level attribute response on the TH(all-clusters-app) Log: [1657279115.433005][4417:4417] CHIP:IM: Received Read request [1657279115.433184][4417:4417] CHIP:DMG: ReadRequestMessage = @@ -522,6 +523,8 @@ tests: verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + + ./chip-tool levelcontrol read current-level 1 1 Verify DUT receives current-level attribute response on the TH(all-clusters-minimal-app) Log: [1657913862.815749][3126:3126] CHIP:IM: Received Read request @@ -605,6 +608,28 @@ tests: [1657913906.649731][3126:3126] CHIP:DMG: isFabricFiltered = true, [1657913906.649757][3126:3126] CHIP:DMG: InteractionModelRevision = 1 [1657913906.649781][3126:3126] CHIP:DMG: }, + + + ./chip-tool levelcontrol read feature-map 1 1 + Verify DUT receives feature-map attribute response on the TH(all-clusters-minimal-app) Log: + [1663070713.467153][4422:4422] CHIP:IM: Received Read request + [1663070713.467242][4422:4422] CHIP:DMG: ReadRequestMessage = + [1663070713.467275][4422:4422] CHIP:DMG: { + [1663070713.467300][4422:4422] CHIP:DMG: AttributePathIBs = + [1663070713.467329][4422:4422] CHIP:DMG: [ + [1663070713.467355][4422:4422] CHIP:DMG: AttributePathIB = + [1663070713.467390][4422:4422] CHIP:DMG: { + [1663070713.467422][4422:4422] CHIP:DMG: Endpoint = 0x1, + [1663070713.467455][4422:4422] CHIP:DMG: Cluster = 0x8, + [1663070713.467487][4422:4422] CHIP:DMG: Attribute = 0x0000_FFFC, + [1663070713.467517][4422:4422] CHIP:DMG: } + [1663070713.467548][4422:4422] CHIP:DMG: + [1663070713.467576][4422:4422] CHIP:DMG: ], + [1663070713.467606][4422:4422] CHIP:DMG: + [1663070713.467635][4422:4422] CHIP:DMG: isFabricFiltered = true, + [1663070713.467663][4422:4422] CHIP:DMG: InteractionModelRevision = 1 + [1663070713.467689][4422:4422] CHIP:DMG: }, + [1663070713.467767][4422:4422] CHIP:DMG: IM RH moving to [GeneratingReports] disabled: true - label: @@ -614,20 +639,158 @@ tests: Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) TH all-clusters-minimal-app does not support optional attributes - To verify this behaviour send the below mentioned commands and check the result as unsupported attribute + ./chip-tool levelcontrol read remaining-time 1 1 + Verify DUT(chip-tool) receives remaining-time attribute response on the TH(all-clusters-minimal-app) Log: + [1663147148.155292][37702:37702] CHIP:IM: Received Read request + [1663147148.155312][37702:37702] CHIP:DMG: ReadRequestMessage = + [1663147148.155315][37702:37702] CHIP:DMG: { + [1663147148.155317][37702:37702] CHIP:DMG: AttributePathIBs = + [1663147148.155320][37702:37702] CHIP:DMG: [ + [1663147148.155323][37702:37702] CHIP:DMG: AttributePathIB = + [1663147148.155326][37702:37702] CHIP:DMG: { + [1663147148.155328][37702:37702] CHIP:DMG: Endpoint = 0x1, + [1663147148.155331][37702:37702] CHIP:DMG: Cluster = 0x8, + [1663147148.155334][37702:37702] CHIP:DMG: Attribute = 0x0000_0001, + [1663147148.155338][37702:37702] CHIP:DMG: } + [1663147148.155341][37702:37702] CHIP:DMG: + [1663147148.155343][37702:37702] CHIP:DMG: ], + [1663147148.155346][37702:37702] CHIP:DMG: + [1663147148.155349][37702:37702] CHIP:DMG: isFabricFiltered = true, + [1663147148.155351][37702:37702] CHIP:DMG: InteractionModelRevision = 1 + [1663147148.155353][37702:37702] CHIP:DMG: }, + [1663147148.155366][37702:37702] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663147148.155376][37702:37702] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + + ./chip-tool levelcontrol read min-level 1 1 + Verify DUT(chip-tool) receives min-level attribute response on the TH(all-clusters-minimal-app) Log: + [1663147176.255360][37702:37702] CHIP:DMG: ReadRequestMessage = + [1663147176.255364][37702:37702] CHIP:DMG: { + [1663147176.255368][37702:37702] CHIP:DMG: AttributePathIBs = + [1663147176.255373][37702:37702] CHIP:DMG: [ + [1663147176.255376][37702:37702] CHIP:DMG: AttributePathIB = + [1663147176.255381][37702:37702] CHIP:DMG: { + [1663147176.255385][37702:37702] CHIP:DMG: Endpoint = 0x1, + [1663147176.255389][37702:37702] CHIP:DMG: Cluster = 0x8, + [1663147176.255393][37702:37702] CHIP:DMG: Attribute = 0x0000_0002, + [1663147176.255396][37702:37702] CHIP:DMG: } + [1663147176.255401][37702:37702] CHIP:DMG: + [1663147176.255404][37702:37702] CHIP:DMG: ], + [1663147176.255409][37702:37702] CHIP:DMG: + [1663147176.255413][37702:37702] CHIP:DMG: isFabricFiltered = true, + [1663147176.255416][37702:37702] CHIP:DMG: InteractionModelRevision = 1 + [1663147176.255419][37702:37702] CHIP:DMG: }, + [1663147176.255436][37702:37702] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663147176.255451][37702:37702] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + ./chip-tool levelcontrol read max-level 1 1 + Verify DUT(chip-tool) receives max-level attribute response on the TH(all-clusters-minimal-app) Log: + [1663147204.133512][37702:37702] CHIP:IM: Received Read request + [1663147204.133528][37702:37702] CHIP:DMG: ReadRequestMessage = + [1663147204.133531][37702:37702] CHIP:DMG: { + [1663147204.133533][37702:37702] CHIP:DMG: AttributePathIBs = + [1663147204.133536][37702:37702] CHIP:DMG: [ + [1663147204.133538][37702:37702] CHIP:DMG: AttributePathIB = + [1663147204.133541][37702:37702] CHIP:DMG: { + [1663147204.133543][37702:37702] CHIP:DMG: Endpoint = 0x1, + [1663147204.133546][37702:37702] CHIP:DMG: Cluster = 0x8, + [1663147204.133549][37702:37702] CHIP:DMG: Attribute = 0x0000_0003, + [1663147204.133551][37702:37702] CHIP:DMG: } + [1663147204.133553][37702:37702] CHIP:DMG: + [1663147204.133555][37702:37702] CHIP:DMG: ], + [1663147204.133558][37702:37702] CHIP:DMG: + [1663147204.133561][37702:37702] CHIP:DMG: isFabricFiltered = true, + [1663147204.133563][37702:37702] CHIP:DMG: InteractionModelRevision = 1 + [1663147204.133565][37702:37702] CHIP:DMG: }, + [1663147204.133577][37702:37702] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663147204.133587][37702:37702] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 ./chip-tool levelcontrol read current-frequency 1 1 + Verify DUT(chip-tool) receives current-frequency attribute response on the TH(all-clusters-minimal-app) Log: + [1663147223.228680][37702:37702] CHIP:IM: Received Read request + [1663147223.228702][37702:37702] CHIP:DMG: ReadRequestMessage = + [1663147223.228706][37702:37702] CHIP:DMG: { + [1663147223.228710][37702:37702] CHIP:DMG: AttributePathIBs = + [1663147223.228714][37702:37702] CHIP:DMG: [ + [1663147223.228717][37702:37702] CHIP:DMG: AttributePathIB = + [1663147223.228722][37702:37702] CHIP:DMG: { + [1663147223.228726][37702:37702] CHIP:DMG: Endpoint = 0x1, + [1663147223.228730][37702:37702] CHIP:DMG: Cluster = 0x8, + [1663147223.228734][37702:37702] CHIP:DMG: Attribute = 0x0000_0004, + [1663147223.228738][37702:37702] CHIP:DMG: } + [1663147223.228742][37702:37702] CHIP:DMG: + [1663147223.228746][37702:37702] CHIP:DMG: ], + [1663147223.228751][37702:37702] CHIP:DMG: + [1663147223.228754][37702:37702] CHIP:DMG: isFabricFiltered = true, + [1663147223.228758][37702:37702] CHIP:DMG: InteractionModelRevision = 1 + [1663147223.228761][37702:37702] CHIP:DMG: }, + [1663147223.228780][37702:37702] CHIP:DMG: IM RH moving to [GeneratingReports] ./chip-tool levelcontrol read min-frequency 1 1 + Verify DUT(chip-tool) receives min-frequency attribute response on the TH(all-clusters-minimal-app) Log: + [1663147242.442251][37702:37702] CHIP:IM: Received Read request + [1663147242.442277][37702:37702] CHIP:DMG: ReadRequestMessage = + [1663147242.442282][37702:37702] CHIP:DMG: { + [1663147242.442287][37702:37702] CHIP:DMG: AttributePathIBs = + [1663147242.442293][37702:37702] CHIP:DMG: [ + [1663147242.442298][37702:37702] CHIP:DMG: AttributePathIB = + [1663147242.442304][37702:37702] CHIP:DMG: { + [1663147242.442309][37702:37702] CHIP:DMG: Endpoint = 0x1, + [1663147242.442315][37702:37702] CHIP:DMG: Cluster = 0x8, + [1663147242.442320][37702:37702] CHIP:DMG: Attribute = 0x0000_0005, + [1663147242.442324][37702:37702] CHIP:DMG: } + [1663147242.442331][37702:37702] CHIP:DMG: + [1663147242.442336][37702:37702] CHIP:DMG: ], + [1663147242.442342][37702:37702] CHIP:DMG: + [1663147242.442347][37702:37702] CHIP:DMG: isFabricFiltered = true, + [1663147242.442352][37702:37702] CHIP:DMG: InteractionModelRevision = 1 + [1663147242.442355][37702:37702] CHIP:DMG: }, + [1663147242.442378][37702:37702] CHIP:DMG: IM RH moving to [GeneratingReports] ./chip-tool levelcontrol read max-frequency 1 1 + Verify DUT(chip-tool) receives max-frequency attribute response on the TH(all-clusters-minimal-app) Log: + [1663147259.687422][37702:37702] CHIP:IM: Received Read request + [1663147259.687445][37702:37702] CHIP:DMG: ReadRequestMessage = + [1663147259.687450][37702:37702] CHIP:DMG: { + [1663147259.687454][37702:37702] CHIP:DMG: AttributePathIBs = + [1663147259.687458][37702:37702] CHIP:DMG: [ + [1663147259.687463][37702:37702] CHIP:DMG: AttributePathIB = + [1663147259.687469][37702:37702] CHIP:DMG: { + [1663147259.687474][37702:37702] CHIP:DMG: Endpoint = 0x1, + [1663147259.687478][37702:37702] CHIP:DMG: Cluster = 0x8, + [1663147259.687481][37702:37702] CHIP:DMG: Attribute = 0x0000_0006, + [1663147259.687485][37702:37702] CHIP:DMG: } + [1663147259.687490][37702:37702] CHIP:DMG: + [1663147259.687494][37702:37702] CHIP:DMG: ], + [1663147259.687500][37702:37702] CHIP:DMG: + [1663147259.687504][37702:37702] CHIP:DMG: isFabricFiltered = true, + [1663147259.687509][37702:37702] CHIP:DMG: InteractionModelRevision = 1 + [1663147259.687513][37702:37702] CHIP:DMG: }, + [1663147259.687532][37702:37702] CHIP:DMG: IM RH moving to [GeneratingReports] ./chip-tool levelcontrol read on-off-transition-time 1 1 + Verify DUT(chip-tool) receives on-off-transition-time attribute response on the TH(all-clusters-minimal-app) Log: + [1663147276.525081][37702:37702] CHIP:IM: Received Read request + [1663147276.525105][37702:37702] CHIP:DMG: ReadRequestMessage = + [1663147276.525110][37702:37702] CHIP:DMG: { + [1663147276.525115][37702:37702] CHIP:DMG: AttributePathIBs = + [1663147276.525120][37702:37702] CHIP:DMG: [ + [1663147276.525124][37702:37702] CHIP:DMG: AttributePathIB = + [1663147276.525129][37702:37702] CHIP:DMG: { + [1663147276.525133][37702:37702] CHIP:DMG: Endpoint = 0x1, + [1663147276.525138][37702:37702] CHIP:DMG: Cluster = 0x8, + [1663147276.525143][37702:37702] CHIP:DMG: Attribute = 0x0000_0010, + [1663147276.525148][37702:37702] CHIP:DMG: } + [1663147276.525155][37702:37702] CHIP:DMG: + [1663147276.525159][37702:37702] CHIP:DMG: ], + [1663147276.525166][37702:37702] CHIP:DMG: + [1663147276.525171][37702:37702] CHIP:DMG: isFabricFiltered = true, + [1663147276.525177][37702:37702] CHIP:DMG: InteractionModelRevision = 1 + [1663147276.525181][37702:37702] CHIP:DMG: }, + [1663147276.525202][37702:37702] CHIP:DMG: IM RH moving to [GeneratingReports] disabled: true - label: @@ -637,10 +800,149 @@ tests: Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) TH all-clusters-minimal-app does not support optional attributes - To verify this behaviour send the below mentioned commands and check the result as unsupported attribute + ./chip-tool levelcontrol write on-off-transition-time 5 1 1 + Verify DUT(chip-tool) receives on-off-transition-time attribute response on the TH(all-clusters-minimal-app) Log: + [1663147558.231731][37702:37702] CHIP:IM: Received Write request + [1663147558.231735][37702:37702] CHIP:DMG: IM WH moving to [Initialized] + [1663147558.231746][37702:37702] CHIP:DMG: WriteRequestMessage = + [1663147558.231749][37702:37702] CHIP:DMG: { + [1663147558.231753][37702:37702] CHIP:DMG: suppressResponse = false, + [1663147558.231757][37702:37702] CHIP:DMG: timedRequest = false, + [1663147558.231760][37702:37702] CHIP:DMG: AttributeDataIBs = + [1663147558.231765][37702:37702] CHIP:DMG: [ + [1663147558.231767][37702:37702] CHIP:DMG: AttributeDataIB = + [1663147558.231771][37702:37702] CHIP:DMG: { + [1663147558.231773][37702:37702] CHIP:DMG: AttributePathIB = + [1663147558.231777][37702:37702] CHIP:DMG: { + [1663147558.231781][37702:37702] CHIP:DMG: Endpoint = 0x1, + [1663147558.231784][37702:37702] CHIP:DMG: Cluster = 0x8, + [1663147558.231789][37702:37702] CHIP:DMG: Attribute = 0x0000_0010, + [1663147558.231792][37702:37702] CHIP:DMG: } + [1663147558.231795][37702:37702] CHIP:DMG: + [1663147558.231798][37702:37702] CHIP:DMG: Data = 5, + [1663147558.231801][37702:37702] CHIP:DMG: }, + [1663147558.231805][37702:37702] CHIP:DMG: + [1663147558.231809][37702:37702] CHIP:DMG: ], + [1663147558.231813][37702:37702] CHIP:DMG: + [1663147558.231816][37702:37702] CHIP:DMG: moreChunkedMessages = false, + [1663147558.231820][37702:37702] CHIP:DMG: InteractionModelRevision = 1 + [1663147558.231822][37702:37702] CHIP:DMG: }, + [1663147558.231844][37702:37702] CHIP:DMG: IM WH moving to [AddStatus] + ./chip-tool levelcontrol write on-transition-time 5 1 1 + Verify DUT(chip-tool) receives on-transition-time attribute response on the TH(all-clusters-minimal-app) Log: + [1663147582.702165][37702:37702] CHIP:IM: Received Write request + [1663147582.702168][37702:37702] CHIP:DMG: IM WH moving to [Initialized] + [1663147582.702179][37702:37702] CHIP:DMG: WriteRequestMessage = + [1663147582.702182][37702:37702] CHIP:DMG: { + [1663147582.702185][37702:37702] CHIP:DMG: suppressResponse = false, + [1663147582.702188][37702:37702] CHIP:DMG: timedRequest = false, + [1663147582.702191][37702:37702] CHIP:DMG: AttributeDataIBs = + [1663147582.702196][37702:37702] CHIP:DMG: [ + [1663147582.702199][37702:37702] CHIP:DMG: AttributeDataIB = + [1663147582.702202][37702:37702] CHIP:DMG: { + [1663147582.702205][37702:37702] CHIP:DMG: AttributePathIB = + [1663147582.702209][37702:37702] CHIP:DMG: { + [1663147582.702212][37702:37702] CHIP:DMG: Endpoint = 0x1, + [1663147582.702216][37702:37702] CHIP:DMG: Cluster = 0x8, + [1663147582.702219][37702:37702] CHIP:DMG: Attribute = 0x0000_0012, + [1663147582.702222][37702:37702] CHIP:DMG: } + [1663147582.702226][37702:37702] CHIP:DMG: + [1663147582.702230][37702:37702] CHIP:DMG: Data = 5, + [1663147582.702233][37702:37702] CHIP:DMG: }, + [1663147582.702236][37702:37702] CHIP:DMG: + [1663147582.702239][37702:37702] CHIP:DMG: ], + [1663147582.702243][37702:37702] CHIP:DMG: + [1663147582.702246][37702:37702] CHIP:DMG: moreChunkedMessages = false, + [1663147582.702248][37702:37702] CHIP:DMG: InteractionModelRevision = 1 + [1663147582.702252][37702:37702] CHIP:DMG: }, + [1663147582.702271][37702:37702] CHIP:DMG: IM WH moving to [AddStatus] + ./chip-tool levelcontrol write off-transition-time 5 1 1 + Verify DUT(chip-tool) receives off-transition-time attribute response on the TH(all-clusters-minimal-app) Log: + [1663147605.317885][37702:37702] CHIP:IM: Received Write request + [1663147605.317891][37702:37702] CHIP:DMG: IM WH moving to [Initialized] + [1663147605.317910][37702:37702] CHIP:DMG: WriteRequestMessage = + [1663147605.317915][37702:37702] CHIP:DMG: { + [1663147605.317920][37702:37702] CHIP:DMG: suppressResponse = false, + [1663147605.317925][37702:37702] CHIP:DMG: timedRequest = false, + [1663147605.317930][37702:37702] CHIP:DMG: AttributeDataIBs = + [1663147605.317936][37702:37702] CHIP:DMG: [ + [1663147605.317941][37702:37702] CHIP:DMG: AttributeDataIB = + [1663147605.317945][37702:37702] CHIP:DMG: { + [1663147605.317950][37702:37702] CHIP:DMG: AttributePathIB = + [1663147605.317956][37702:37702] CHIP:DMG: { + [1663147605.317962][37702:37702] CHIP:DMG: Endpoint = 0x1, + [1663147605.317968][37702:37702] CHIP:DMG: Cluster = 0x8, + [1663147605.317973][37702:37702] CHIP:DMG: Attribute = 0x0000_0013, + [1663147605.317978][37702:37702] CHIP:DMG: } + [1663147605.317985][37702:37702] CHIP:DMG: + [1663147605.317990][37702:37702] CHIP:DMG: Data = 5, + [1663147605.317996][37702:37702] CHIP:DMG: }, + [1663147605.318002][37702:37702] CHIP:DMG: + [1663147605.318007][37702:37702] CHIP:DMG: ], + [1663147605.318014][37702:37702] CHIP:DMG: + [1663147605.318018][37702:37702] CHIP:DMG: moreChunkedMessages = false, + [1663147605.318024][37702:37702] CHIP:DMG: InteractionModelRevision = 1 + [1663147605.318028][37702:37702] CHIP:DMG: }, + [1663147605.318058][37702:37702] CHIP:DMG: IM WH moving to [AddStatus] + ./chip-tool levelcontrol write default-move-rate 5 1 1 + Verify DUT(chip-tool) receives default-move-rate attribute response on the TH(all-clusters-minimal-app) Log: + [1663147644.857538][37702:37702] CHIP:IM: Received Write request + [1663147644.857541][37702:37702] CHIP:DMG: IM WH moving to [Initialized] + [1663147644.857552][37702:37702] CHIP:DMG: WriteRequestMessage = + [1663147644.857555][37702:37702] CHIP:DMG: { + [1663147644.857557][37702:37702] CHIP:DMG: suppressResponse = false, + [1663147644.857560][37702:37702] CHIP:DMG: timedRequest = false, + [1663147644.857562][37702:37702] CHIP:DMG: AttributeDataIBs = + [1663147644.857566][37702:37702] CHIP:DMG: [ + [1663147644.857568][37702:37702] CHIP:DMG: AttributeDataIB = + [1663147644.857571][37702:37702] CHIP:DMG: { + [1663147644.857574][37702:37702] CHIP:DMG: AttributePathIB = + [1663147644.857577][37702:37702] CHIP:DMG: { + [1663147644.857580][37702:37702] CHIP:DMG: Endpoint = 0x1, + [1663147644.857582][37702:37702] CHIP:DMG: Cluster = 0x8, + [1663147644.857585][37702:37702] CHIP:DMG: Attribute = 0x0000_0014, + [1663147644.857587][37702:37702] CHIP:DMG: } + [1663147644.857591][37702:37702] CHIP:DMG: + [1663147644.857594][37702:37702] CHIP:DMG: Data = 5, + [1663147644.857596][37702:37702] CHIP:DMG: }, + [1663147644.857601][37702:37702] CHIP:DMG: + [1663147644.857603][37702:37702] CHIP:DMG: ], + [1663147644.857606][37702:37702] CHIP:DMG: + [1663147644.857609][37702:37702] CHIP:DMG: moreChunkedMessages = false, + [1663147644.857611][37702:37702] CHIP:DMG: InteractionModelRevision = 1 + [1663147644.857613][37702:37702] CHIP:DMG: }, + [1663147644.857629][37702:37702] CHIP:DMG: IM WH moving to [AddStatus] + ./chip-tool levelcontrol write start-up-current-level 5 1 1 + Verify DUT(chip-tool) receives start-up-current-level attribute response on the TH(all-clusters-minimal-app) Log: + [1663147665.149448][37702:37702] CHIP:IM: Received Write request + [1663147665.149453][37702:37702] CHIP:DMG: IM WH moving to [Initialized] + [1663147665.149474][37702:37702] CHIP:DMG: WriteRequestMessage = + [1663147665.149480][37702:37702] CHIP:DMG: { + [1663147665.149486][37702:37702] CHIP:DMG: suppressResponse = false, + [1663147665.149492][37702:37702] CHIP:DMG: timedRequest = false, + [1663147665.149497][37702:37702] CHIP:DMG: AttributeDataIBs = + [1663147665.149506][37702:37702] CHIP:DMG: [ + [1663147665.149511][37702:37702] CHIP:DMG: AttributeDataIB = + [1663147665.149520][37702:37702] CHIP:DMG: { + [1663147665.149525][37702:37702] CHIP:DMG: AttributePathIB = + [1663147665.149532][37702:37702] CHIP:DMG: { + [1663147665.149539][37702:37702] CHIP:DMG: Endpoint = 0x1, + [1663147665.149545][37702:37702] CHIP:DMG: Cluster = 0x8, + [1663147665.149552][37702:37702] CHIP:DMG: Attribute = 0x0000_4000, + [1663147665.149558][37702:37702] CHIP:DMG: } + [1663147665.149565][37702:37702] CHIP:DMG: + [1663147665.149572][37702:37702] CHIP:DMG: Data = 5, + [1663147665.149578][37702:37702] CHIP:DMG: }, + [1663147665.149586][37702:37702] CHIP:DMG: + [1663147665.149590][37702:37702] CHIP:DMG: ], + [1663147665.149598][37702:37702] CHIP:DMG: + [1663147665.149604][37702:37702] CHIP:DMG: moreChunkedMessages = false, + [1663147665.149609][37702:37702] CHIP:DMG: InteractionModelRevision = 1 + [1663147665.149614][37702:37702] CHIP:DMG: }, + [1663147665.149652][37702:37702] CHIP:DMG: IM WH moving to [AddStatus] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml index 095deb01323ba0..5a92a02a5fc3cb 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml @@ -241,7 +241,33 @@ tests: [1659589890.492658][3088:3088] CHIP:DMG: InteractionModelRevision = 1 [1659589890.492679][3088:3088] CHIP:DMG: }, - + ./chip-tool modeselect read feature-map 1 1 + + verify the " feature-map " on the TH (all-cluster-minimal-app) log: + + [1663142252.747239][5476:5476] CHIP:IM: Received Read request + [1663142252.747411][5476:5476] CHIP:DMG: ReadRequestMessage = + [1663142252.747649][5476:5476] CHIP:DMG: { + [1663142252.747731][5476:5476] CHIP:DMG: AttributePathIBs = + [1663142252.747799][5476:5476] CHIP:DMG: [ + [1663142252.747861][5476:5476] CHIP:DMG: AttributePathIB = + [1663142252.747966][5476:5476] CHIP:DMG: { + [1663142252.748039][5476:5476] CHIP:DMG: Endpoint = 0x1, + [1663142252.748137][5476:5476] CHIP:DMG: Cluster = 0x50, + [1663142252.748226][5476:5476] CHIP:DMG: Attribute = 0x0000_FFFC, + [1663142252.748321][5476:5476] CHIP:DMG: } + [1663142252.748398][5476:5476] CHIP:DMG: + [1663142252.748488][5476:5476] CHIP:DMG: ], + [1663142252.748561][5476:5476] CHIP:DMG: + [1663142252.748627][5476:5476] CHIP:DMG: isFabricFiltered = true, + [1663142252.748716][5476:5476] CHIP:DMG: InteractionModelRevision = 1 + [1663142252.748775][5476:5476] CHIP:DMG: }, + [1663142252.748965][5476:5476] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663142252.749188][5476:5476] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663142252.749311][5476:5476] CHIP:DMG: Cluster 50, Attribute fffc is dirty + [1663142252.749358][5476:5476] CHIP:DMG: Reading attribute: Cluster=0x0000_0050 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) + [1663142252.749531][5476:5476] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0050 e=1 p=v + [1663142252.749617][5476:5476] CHIP:DMG: AccessControl: allowed ./chip-tool modeselect read supported-modes 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_OO_3_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_3_1.yaml index 313c82f44ebab9..efea15f75ef5b9 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_3_1.yaml @@ -300,6 +300,31 @@ tests: [1657906380.687904][2361:2361] CHIP:DMG: }, + ./chip-tool onoff read feature-map 1 1 + + verify the " feature-map response" on the TH (all-cluster-minimal-app) log: + + [1663142640.719145][5476:5476] CHIP:EM: Handling via exchange: 32627r, Delegate: 0xaaaac9e6b028 + [1663142640.719195][5476:5476] CHIP:IM: Received Read request + [1663142640.719289][5476:5476] CHIP:DMG: ReadRequestMessage = + [1663142640.719321][5476:5476] CHIP:DMG: { + [1663142640.719347][5476:5476] CHIP:DMG: AttributePathIBs = + [1663142640.719377][5476:5476] CHIP:DMG: [ + [1663142640.719406][5476:5476] CHIP:DMG: AttributePathIB = + [1663142640.719524][5476:5476] CHIP:DMG: { + [1663142640.719562][5476:5476] CHIP:DMG: Endpoint = 0x1, + [1663142640.719601][5476:5476] CHIP:DMG: Cluster = 0x6, + [1663142640.719643][5476:5476] CHIP:DMG: Attribute = 0x0000_FFFC, + [1663142640.719681][5476:5476] CHIP:DMG: } + [1663142640.719716][5476:5476] CHIP:DMG: + [1663142640.719749][5476:5476] CHIP:DMG: ], + [1663142640.719782][5476:5476] CHIP:DMG: + [1663142640.719813][5476:5476] CHIP:DMG: isFabricFiltered = true, + [1663142640.719843][5476:5476] CHIP:DMG: InteractionModelRevision = 1 + [1663142640.719870][5476:5476] CHIP:DMG: }, + [1663142640.719954][5476:5476] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663142640.720064][5476:5476] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663142640.720099][5476:5476] CHIP:DMG: Cluster 6, Attribute fffc is dirty ./chip-tool onoff read on-off 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_PSCFG_3_1.yaml b/src/app/tests/suites/certification/Test_TC_PSCFG_3_1.yaml index f82b198ea5dd73..4af8ab15bb3c27 100644 --- a/src/app/tests/suites/certification/Test_TC_PSCFG_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PSCFG_3_1.yaml @@ -86,6 +86,32 @@ tests: also reflects this in global attributes such as FeatureMap and AttributeList. Commission DUT to TH aga" verification: | + ./chip-tool powersourceconfiguration read attribute-list 1 0 + + Verify the ReadRequestMessage the TH (all-cluster-minimal-app) log: + + [1663147271.622589][2750:2750] CHIP:IM: Received Read request + [1663147271.622666][2750:2750] CHIP:DMG: ReadRequestMessage = + [1663147271.622692][2750:2750] CHIP:DMG: { + [1663147271.622714][2750:2750] CHIP:DMG: AttributePathIBs = + [1663147271.622739][2750:2750] CHIP:DMG: [ + [1663147271.622789][2750:2750] CHIP:DMG: AttributePathIB = + [1663147271.622821][2750:2750] CHIP:DMG: { + [1663147271.622849][2750:2750] CHIP:DMG: Endpoint = 0x0, + [1663147271.622880][2750:2750] CHIP:DMG: Cluster = 0x2e, + [1663147271.622914][2750:2750] CHIP:DMG: Attribute = 0x0000_FFFB, + [1663147271.622943][2750:2750] CHIP:DMG: } + [1663147271.622971][2750:2750] CHIP:DMG: + [1663147271.622996][2750:2750] CHIP:DMG: ], + [1663147271.623023][2750:2750] CHIP:DMG: + [1663147271.623049][2750:2750] CHIP:DMG: isFabricFiltered = true, + [1663147271.623074][2750:2750] CHIP:DMG: InteractionModelRevision = 1 + [1663147271.623097][2750:2750] CHIP:DMG: }, + [1663147271.623168][2750:2750] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663147271.623246][2750:2750] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663147271.623274][2750:2750] CHIP:DMG: Cluster 2e, Attribute fffb is dirty + + ./chip-tool powersourceconfiguration read sources 1 0 verify the " sources response" on the TH (all-cluster-minimal-app) log: diff --git a/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml index 1808f11adfa5bd..9d3a4c8e265b61 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml @@ -113,6 +113,79 @@ tests: [1653395620.021104][19412:19412] CHIP:DMG: InteractionModelRevision = 1 [1653395620.021153][19412:19412] CHIP:DMG: }, [1653395620.021252][19412:19412] CHIP:DMG: IM RH moving to [GeneratingReports] + + + ./chip-tool powersource read bat-charge-level 1 1 + + Verify the ReadRequestMessage on TH(all-clusters-app) log) + + [1663140804.059599][2414:2414] CHIP:IM: Received Read request + [1663140804.059679][2414:2414] CHIP:DMG: ReadRequestMessage = + [1663140804.059706][2414:2414] CHIP:DMG: { + [1663140804.059728][2414:2414] CHIP:DMG: AttributePathIBs = + [1663140804.059754][2414:2414] CHIP:DMG: [ + [1663140804.059779][2414:2414] CHIP:DMG: AttributePathIB = + [1663140804.059828][2414:2414] CHIP:DMG: { + [1663140804.059861][2414:2414] CHIP:DMG: Endpoint = 0x1, + [1663140804.059913][2414:2414] CHIP:DMG: Cluster = 0x2f, + [1663140804.059946][2414:2414] CHIP:DMG: Attribute = 0x0000_000E, + [1663140804.059976][2414:2414] CHIP:DMG: } + [1663140804.060006][2414:2414] CHIP:DMG: + [1663140804.060033][2414:2414] CHIP:DMG: ], + [1663140804.060060][2414:2414] CHIP:DMG: + [1663140804.060087][2414:2414] CHIP:DMG: isFabricFiltered = true, + [1663140804.060111][2414:2414] CHIP:DMG: InteractionModelRevision = 1 + [1663140804.060136][2414:2414] CHIP:DMG: }, + + + ./chip-tool powersource read bat-replacement-needed 1 1 + + Verify the ReadRequestMessage on TH(all-clusters-app) log) + + [1663141268.348233][2414:2414] CHIP:IM: Received Read request + [1663141268.348332][2414:2414] CHIP:DMG: ReadRequestMessage = + [1663141268.348388][2414:2414] CHIP:DMG: { + [1663141268.348418][2414:2414] CHIP:DMG: AttributePathIBs = + [1663141268.348465][2414:2414] CHIP:DMG: [ + [1663141268.348498][2414:2414] CHIP:DMG: AttributePathIB = + [1663141268.348545][2414:2414] CHIP:DMG: { + [1663141268.348584][2414:2414] CHIP:DMG: Endpoint = 0x1, + [1663141268.348637][2414:2414] CHIP:DMG: Cluster = 0x2f, + [1663141268.348685][2414:2414] CHIP:DMG: Attribute = 0x0000_000F, + [1663141268.348735][2414:2414] CHIP:DMG: } + [1663141268.348774][2414:2414] CHIP:DMG: + [1663141268.348820][2414:2414] CHIP:DMG: ], + [1663141268.348857][2414:2414] CHIP:DMG: + [1663141268.348904][2414:2414] CHIP:DMG: isFabricFiltered = true, + [1663141268.348938][2414:2414] CHIP:DMG: InteractionModelRevision = 1 + [1663141268.348982][2414:2414] CHIP:DMG: }, + [1663141268.349086][2414:2414] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663141268.349214][2414:2414] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663141268.349251][2414:2414] CHIP:DMG: Cluster 2f, Attribute f is dirty + + + ./chip-tool powersource read bat-replaceability 1 1 + + Verify the ReadRequestMessage on TH(all-clusters-app) log + + + [1663141378.115928][2414:2414] CHIP:DMG: ReadRequestMessage = + [1663141378.115978][2414:2414] CHIP:DMG: { + [1663141378.116006][2414:2414] CHIP:DMG: AttributePathIBs = + [1663141378.116050][2414:2414] CHIP:DMG: [ + [1663141378.116080][2414:2414] CHIP:DMG: AttributePathIB = + [1663141378.116124][2414:2414] CHIP:DMG: { + [1663141378.116160][2414:2414] CHIP:DMG: Endpoint = 0x1, + [1663141378.116208][2414:2414] CHIP:DMG: Cluster = 0x2f, + [1663141378.116247][2414:2414] CHIP:DMG: Attribute = 0x0000_0010, + [1663141378.116294][2414:2414] CHIP:DMG: } + [1663141378.116330][2414:2414] CHIP:DMG: + [1663141378.116372][2414:2414] CHIP:DMG: ], + [1663141378.116407][2414:2414] CHIP:DMG: + [1663141378.116450][2414:2414] CHIP:DMG: isFabricFiltered = true, + [1663141378.116481][2414:2414] CHIP:DMG: InteractionModelRevision = 1 + [1663141378.116521][2414:2414] CHIP:DMG: }, + [1663141378.116621][2414:2414] CHIP:DMG: IM RH moving to [GeneratingReports] disabled: true - label: @@ -240,6 +313,79 @@ tests: [1653395620.021104][19412:19412] CHIP:DMG: InteractionModelRevision = 1 [1653395620.021153][19412:19412] CHIP:DMG: }, [1653395620.021252][19412:19412] CHIP:DMG: IM RH moving to [GeneratingReports] + + + ./chip-tool powersource read bat-charge-level 1 1 + + Verify the ReadRequestMessage on TH(all-clusters-minimal-app) log + + [1663140804.059599][2414:2414] CHIP:IM: Received Read request + [1663140804.059679][2414:2414] CHIP:DMG: ReadRequestMessage = + [1663140804.059706][2414:2414] CHIP:DMG: { + [1663140804.059728][2414:2414] CHIP:DMG: AttributePathIBs = + [1663140804.059754][2414:2414] CHIP:DMG: [ + [1663140804.059779][2414:2414] CHIP:DMG: AttributePathIB = + [1663140804.059828][2414:2414] CHIP:DMG: { + [1663140804.059861][2414:2414] CHIP:DMG: Endpoint = 0x1, + [1663140804.059913][2414:2414] CHIP:DMG: Cluster = 0x2f, + [1663140804.059946][2414:2414] CHIP:DMG: Attribute = 0x0000_000E, + [1663140804.059976][2414:2414] CHIP:DMG: } + [1663140804.060006][2414:2414] CHIP:DMG: + [1663140804.060033][2414:2414] CHIP:DMG: ], + [1663140804.060060][2414:2414] CHIP:DMG: + [1663140804.060087][2414:2414] CHIP:DMG: isFabricFiltered = true, + [1663140804.060111][2414:2414] CHIP:DMG: InteractionModelRevision = 1 + [1663140804.060136][2414:2414] CHIP:DMG: }, + + + ./chip-tool powersource read bat-replacement-needed 1 1 + + Verify the ReadRequestMessage on TH(all-clusters-minimal-app) log + + [1663141268.348233][2414:2414] CHIP:IM: Received Read request + [1663141268.348332][2414:2414] CHIP:DMG: ReadRequestMessage = + [1663141268.348388][2414:2414] CHIP:DMG: { + [1663141268.348418][2414:2414] CHIP:DMG: AttributePathIBs = + [1663141268.348465][2414:2414] CHIP:DMG: [ + [1663141268.348498][2414:2414] CHIP:DMG: AttributePathIB = + [1663141268.348545][2414:2414] CHIP:DMG: { + [1663141268.348584][2414:2414] CHIP:DMG: Endpoint = 0x1, + [1663141268.348637][2414:2414] CHIP:DMG: Cluster = 0x2f, + [1663141268.348685][2414:2414] CHIP:DMG: Attribute = 0x0000_000F, + [1663141268.348735][2414:2414] CHIP:DMG: } + [1663141268.348774][2414:2414] CHIP:DMG: + [1663141268.348820][2414:2414] CHIP:DMG: ], + [1663141268.348857][2414:2414] CHIP:DMG: + [1663141268.348904][2414:2414] CHIP:DMG: isFabricFiltered = true, + [1663141268.348938][2414:2414] CHIP:DMG: InteractionModelRevision = 1 + [1663141268.348982][2414:2414] CHIP:DMG: }, + [1663141268.349086][2414:2414] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663141268.349214][2414:2414] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663141268.349251][2414:2414] CHIP:DMG: Cluster 2f, Attribute f is dirty + + + ./chip-tool powersource read bat-replaceability 1 1 + + Verify the ReadRequestMessage on TH(all-clusters-minimal-app) log + + + [1663141378.115928][2414:2414] CHIP:DMG: ReadRequestMessage = + [1663141378.115978][2414:2414] CHIP:DMG: { + [1663141378.116006][2414:2414] CHIP:DMG: AttributePathIBs = + [1663141378.116050][2414:2414] CHIP:DMG: [ + [1663141378.116080][2414:2414] CHIP:DMG: AttributePathIB = + [1663141378.116124][2414:2414] CHIP:DMG: { + [1663141378.116160][2414:2414] CHIP:DMG: Endpoint = 0x1, + [1663141378.116208][2414:2414] CHIP:DMG: Cluster = 0x2f, + [1663141378.116247][2414:2414] CHIP:DMG: Attribute = 0x0000_0010, + [1663141378.116294][2414:2414] CHIP:DMG: } + [1663141378.116330][2414:2414] CHIP:DMG: + [1663141378.116372][2414:2414] CHIP:DMG: ], + [1663141378.116407][2414:2414] CHIP:DMG: + [1663141378.116450][2414:2414] CHIP:DMG: isFabricFiltered = true, + [1663141378.116481][2414:2414] CHIP:DMG: InteractionModelRevision = 1 + [1663141378.116521][2414:2414] CHIP:DMG: }, + [1663141378.116621][2414:2414] CHIP:DMG: IM RH moving to [GeneratingReports] disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_RH_3_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_3_1.yaml index 4f33bf4e31ab3f..1159f992a3fb7b 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_3_1.yaml @@ -160,6 +160,32 @@ tests: also reflects this in global attributes such as FeatureMap and AttributeList. Commission DUT to TH again" verification: | + ./chip-tool relativehumiditymeasurement read feature-map 1 1 + + verify the "feature-map response" on the TH (all-cluster-minimal-app) log: + + [1663157920.343837][6214:6214] CHIP:IM: Received Read request + [1663157920.343910][6214:6214] CHIP:DMG: ReadRequestMessage = + [1663157920.343933][6214:6214] CHIP:DMG: { + [1663157920.343952][6214:6214] CHIP:DMG: AttributePathIBs = + [1663157920.343974][6214:6214] CHIP:DMG: [ + [1663157920.343994][6214:6214] CHIP:DMG: AttributePathIB = + [1663157920.344021][6214:6214] CHIP:DMG: { + [1663157920.344048][6214:6214] CHIP:DMG: Endpoint = 0x1, + [1663157920.344076][6214:6214] CHIP:DMG: Cluster = 0x405, + [1663157920.344104][6214:6214] CHIP:DMG: Attribute = 0x0000_FFFC, + [1663157920.344128][6214:6214] CHIP:DMG: } + [1663157920.344154][6214:6214] CHIP:DMG: + [1663157920.344177][6214:6214] CHIP:DMG: ], + [1663157920.344202][6214:6214] CHIP:DMG: + [1663157920.344225][6214:6214] CHIP:DMG: isFabricFiltered = true, + [1663157920.344246][6214:6214] CHIP:DMG: InteractionModelRevision = 1 + [1663157920.344266][6214:6214] CHIP:DMG: }, + [1663157920.344332][6214:6214] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663157920.344414][6214:6214] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663157920.344440][6214:6214] CHIP:DMG: Cluster 405, Attribute fffc is dirty + + ./chip-tool relativehumiditymeasurement read attribute-list 1 1 diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index c9821cbbc808d0..9930fc5b2bc112 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -239,26 +239,26 @@ CC.C.A0038=1 CC.C.A003a=1 CC.C.A003b=1 CC.C.A003c=1 -CC.C.C00.Rsp=1 -CC.C.C0a.Rsp=1 -CC.C.C01.Rsp=1 -CC.C.C02.Rsp=1 -CC.C.C03.Rsp=1 -CC.C.C04.Rsp=1 -CC.C.C05.Rsp=1 -CC.C.C06.Rsp=1 -CC.C.C07.Rsp=1 -CC.C.C08.Rsp=1 -CC.C.C47.Rsp=1 -CC.C.C09.Rsp=1 -CC.C.C0a.Rsp=1 -CC.C.C4b.Rsp=1 -CC.C.C4c.Rsp=1 -CC.C.C40.Rsp=1 -CC.C.C41.Rsp=1 -CC.C.C42.Rsp=1 -CC.C.C43.Rsp=1 -CC.C.C44.Rsp=1 +CC.C.C00.Tx=1 +CC.C.C0a.Tx=1 +CC.C.C01.Tx=1 +CC.C.C02.Tx=1 +CC.C.C03.Tx=1 +CC.C.C04.Tx=1 +CC.C.C05.Tx=1 +CC.C.C06.Tx=1 +CC.C.C07.Tx=1 +CC.C.C08.Tx=1 +CC.C.C47.Tx=1 +CC.C.C09.Tx=1 +CC.C.C0a.Tx=1 +CC.C.C4b.Tx=1 +CC.C.C4c.Tx=1 +CC.C.C40.Tx=1 +CC.C.C41.Tx=1 +CC.C.C42.Tx=1 +CC.C.C43.Tx=1 +CC.C.C44.Tx=1 #MEDIA CLUSTER #App Launcher diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index 6cc54e5ee913ca..a51f3573f85786 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -171,6 +171,10 @@ CommissioningStage AutoCommissioner::GetNextCommissioningStage(CommissioningStag CommissioningStage AutoCommissioner::GetNextCommissioningStageInternal(CommissioningStage currentStage, CHIP_ERROR & lastErr) { + if (mStopCommissioning) + { + return CommissioningStage::kCleanup; + } if (lastErr != CHIP_NO_ERROR) { return CommissioningStage::kCleanup; @@ -345,6 +349,7 @@ CHIP_ERROR AutoCommissioner::StartCommissioning(DeviceCommissioner * commissione ChipLogError(Controller, "Device proxy secure session error"); return CHIP_ERROR_INVALID_ARGUMENT; } + mStopCommissioning = false; mCommissioner = commissioner; mCommissioneeDeviceProxy = proxy; mNeedsNetworkSetup = @@ -494,6 +499,10 @@ CHIP_ERROR AutoCommissioner::CommissioningStepFinished(CHIP_ERROR err, Commissio .SetRemoteProductId(mDeviceCommissioningInfo.basic.productId) .SetDefaultRegulatoryLocation(mDeviceCommissioningInfo.general.currentRegulatoryLocation) .SetLocationCapability(mDeviceCommissioningInfo.general.locationCapability); + if (mDeviceCommissioningInfo.nodeId != kUndefinedNodeId) + { + mParams.SetRemoteNodeId(mDeviceCommissioningInfo.nodeId); + } break; case CommissioningStage::kSendPAICertificateRequest: SetPAI(report.Get().certificate); @@ -501,10 +510,34 @@ CHIP_ERROR AutoCommissioner::CommissioningStepFinished(CHIP_ERROR err, Commissio case CommissioningStage::kSendDACCertificateRequest: SetDAC(report.Get().certificate); break; - case CommissioningStage::kSendAttestationRequest: - // These don't need to be deep copied to local memory because they are used in this one step then never again. - mParams.SetAttestationElements(report.Get().attestationElements) - .SetAttestationSignature(report.Get().signature); + case CommissioningStage::kSendAttestationRequest: { + auto & elements = report.Get().attestationElements; + auto & signature = report.Get().signature; + if (elements.size() > sizeof(mAttestationElements)) + { + ChipLogError(Controller, "AutoCommissioner attestationElements buffer size %u larger than cache size %u", + static_cast(elements.size()), static_cast(sizeof(mAttestationElements))); + return CHIP_ERROR_MESSAGE_TOO_LONG; + } + memcpy(mAttestationElements, elements.data(), elements.size()); + mAttestationElementsLen = static_cast(elements.size()); + mParams.SetAttestationElements(ByteSpan(mAttestationElements, elements.size())); + ChipLogDetail(Controller, "AutoCommissioner setting attestationElements buffer size %u/%u", + static_cast(elements.size()), + static_cast(mParams.GetAttestationElements().Value().size())); + + if (signature.size() > sizeof(mAttestationSignature)) + { + ChipLogError(Controller, + "AutoCommissioner attestationSignature buffer size %u larger than " + "cache size %u", + static_cast(signature.size()), static_cast(sizeof(mAttestationSignature))); + return CHIP_ERROR_MESSAGE_TOO_LONG; + } + memcpy(mAttestationSignature, signature.data(), signature.size()); + mAttestationSignatureLen = static_cast(signature.size()); + mParams.SetAttestationSignature(ByteSpan(mAttestationSignature, signature.size())); + // TODO: Does this need to be done at runtime? Seems like this could be done earlier and we wouldn't need to hold a // reference to the operational credential delegate here if (mOperationalCredentialsDelegate != nullptr) @@ -514,6 +547,7 @@ CHIP_ERROR AutoCommissioner::CommissioningStepFinished(CHIP_ERROR err, Commissio mParams.SetCSRNonce(ByteSpan(mCSRNonce, sizeof(mCSRNonce))); } break; + } case CommissioningStage::kSendOpCertSigningRequest: { NOCChainGenerationParameters nocParams; nocParams.nocsrElements = report.Get().nocsrElements; diff --git a/src/controller/AutoCommissioner.h b/src/controller/AutoCommissioner.h index 4dbfa4332841bf..c7d16f15e64130 100644 --- a/src/controller/AutoCommissioner.h +++ b/src/controller/AutoCommissioner.h @@ -18,6 +18,7 @@ #pragma once #include #include +#include #include namespace chip { @@ -35,9 +36,14 @@ class AutoCommissioner : public CommissioningDelegate void SetOperationalCredentialsDelegate(OperationalCredentialsDelegate * operationalCredentialsDelegate) override; CHIP_ERROR StartCommissioning(DeviceCommissioner * commissioner, CommissioneeDeviceProxy * proxy) override; + void StopCommissioning() { mStopCommissioning = true; }; CHIP_ERROR CommissioningStepFinished(CHIP_ERROR err, CommissioningDelegate::CommissioningReport report) override; + ByteSpan GetAttestationElements() const { return ByteSpan(mAttestationElements, mAttestationElementsLen); } + ByteSpan GetAttestationSignature() const { return ByteSpan(mAttestationSignature, mAttestationSignatureLen); } + ByteSpan GetAttestationNonce() const { return ByteSpan(mAttestationNonce); } + protected: CommissioningStage GetNextCommissioningStage(CommissioningStage currentStage, CHIP_ERROR & lastErr); DeviceCommissioner * GetCommissioner() { return mCommissioner; } @@ -63,6 +69,8 @@ class AutoCommissioner : public CommissioningDelegate EndpointId GetEndpoint(const CommissioningStage & stage) const; CommissioningStage GetNextCommissioningStageInternal(CommissioningStage currentStage, CHIP_ERROR & lastErr); + bool mStopCommissioning = false; + DeviceCommissioner * mCommissioner = nullptr; CommissioneeDeviceProxy * mCommissioneeDeviceProxy = nullptr; OperationalCredentialsDelegate * mOperationalCredentialsDelegate = nullptr; @@ -86,6 +94,11 @@ class AutoCommissioner : public CommissioningDelegate uint8_t mCSRNonce[kCSRNonceLength]; uint8_t mNOCertBuffer[Credentials::kMaxCHIPCertLength]; uint8_t mICACertBuffer[Credentials::kMaxCHIPCertLength]; + + uint16_t mAttestationElementsLen = 0; + uint8_t mAttestationElements[Credentials::kMaxRspLen]; + uint16_t mAttestationSignatureLen = 0; + uint8_t mAttestationSignature[Crypto::kMax_ECDSA_Signature_Length]; }; } // namespace Controller } // namespace chip diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index d7ca650e1636b4..747760e2f5ea32 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -62,6 +62,12 @@ class DLL_EXPORT ClusterBase // TODO: remove when we start using InvokeCommand everywhere void SetCommandTimeout(Optional timeout) { mTimeout = timeout; } + /** + * Returns the current command timeout set via SetCommandTimeout, or an + * empty optional if no timeout has been set. + */ + Optional GetCommandTimeout() { return mTimeout; } + ClusterId GetClusterId() const { return mClusterId; } /* diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 20d3dbd8ccfeab..7ac27332ee0f38 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -1739,6 +1739,64 @@ void DeviceCommissioner::OnDone(app::ReadClient *) return CHIP_NO_ERROR; } }); + + // Try to parse as much as we can here before returning, even if this is an error. + return_err = (err == CHIP_NO_ERROR) ? return_err : err; + + err = mAttributeCache->ForEachAttribute(OperationalCredentials::Id, [this, &info](const app::ConcreteAttributePath & path) { + // this code is checking if the device is already on the commissioner's fabric. + // if a matching fabric is found, then remember the nodeId so that the commissioner + // can, if it decides to, cancel commissioning (before it fails in AddNoc) and know + // the device's nodeId on its fabric. + switch (path.mAttributeId) + { + case OperationalCredentials::Attributes::Fabrics::Id: { + OperationalCredentials::Attributes::Fabrics::TypeInfo::DecodableType fabrics; + ReturnErrorOnFailure(this->mAttributeCache->Get(path, fabrics)); + // this is a best effort attempt to find a matching fabric, so no error checking on iter + auto iter = fabrics.begin(); + while (iter.Next()) + { + auto & fabricDescriptor = iter.GetValue(); + ChipLogProgress(Controller, + "DeviceCommissioner::OnDone - fabric.vendorId=0x%04X fabric.fabricId=0x" ChipLogFormatX64 + " fabric.nodeId=0x" ChipLogFormatX64, + fabricDescriptor.vendorId, ChipLogValueX64(fabricDescriptor.fabricId), + ChipLogValueX64(fabricDescriptor.nodeId)); + if (GetFabricId() == fabricDescriptor.fabricId) + { + ChipLogProgress(Controller, "DeviceCommissioner::OnDone - found a matching fabric id"); + chip::ByteSpan rootKeySpan = fabricDescriptor.rootPublicKey; + if (rootKeySpan.size() != Crypto::kP256_PublicKey_Length) + { + ChipLogError(Controller, "DeviceCommissioner::OnDone - fabric root key size mismatch %u != %u", + static_cast(rootKeySpan.size()), + static_cast(Crypto::kP256_PublicKey_Length)); + continue; + } + P256PublicKeySpan rootPubKeySpan(rootKeySpan.data()); + Crypto::P256PublicKey deviceRootPublicKey(rootPubKeySpan); + + Crypto::P256PublicKey commissionerRootPublicKey; + if (CHIP_NO_ERROR != GetRootPublicKey(commissionerRootPublicKey)) + { + ChipLogError(Controller, "DeviceCommissioner::OnDone - error reading commissioner root public key"); + } + else if (commissionerRootPublicKey.Matches(deviceRootPublicKey)) + { + ChipLogProgress(Controller, "DeviceCommissioner::OnDone - fabric root keys match"); + info.nodeId = fabricDescriptor.nodeId; + } + } + } + + return CHIP_NO_ERROR; + } + default: + return CHIP_NO_ERROR; + } + }); + // Try to parse as much as we can here before returning, even if this is an error. return_err = err == CHIP_NO_ERROR ? return_err : err; @@ -2003,7 +2061,8 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio app::InteractionModelEngine * engine = app::InteractionModelEngine::GetInstance(); app::ReadPrepareParams readParams(proxy->GetSecureSession().Value()); - app::AttributePathParams readPaths[8]; + // NOTE: this array cannot have more than 9 entries, since the spec mandates that server only needs to support 9 + app::AttributePathParams readPaths[9]; // Read all the feature maps for all the networking clusters on any endpoint to determine what is supported readPaths[0] = app::AttributePathParams(app::Clusters::NetworkCommissioning::Id, app::Clusters::NetworkCommissioning::Attributes::FeatureMap::Id); @@ -2027,6 +2086,15 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio readParams.mpAttributePathParamsList = readPaths; readParams.mAttributePathParamsListSize = 8; + + // Read the current fabrics + if (params.GetCheckForMatchingFabric()) + { + readParams.mAttributePathParamsListSize = 9; + readPaths[8] = app::AttributePathParams(OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id); + } + + readParams.mIsFabricFiltered = false; if (timeout.HasValue()) { readParams.mTimeout = timeout.Value(); diff --git a/src/controller/CommissioningDelegate.h b/src/controller/CommissioningDelegate.h index 1e3fdef1276e44..355d740a0c31df 100644 --- a/src/controller/CommissioningDelegate.h +++ b/src/controller/CommissioningDelegate.h @@ -196,6 +196,10 @@ class CommissioningParameters // This must be set before calling PerformCommissioningStep for the kAttestationVerification step. const Optional GetDAC() const { return mDAC; } + // Node ID when a matching fabric is found in the Node Operational Credentials cluster. + // In the AutoCommissioner, this is set from kReadCommissioningInfo stage. + const Optional GetRemoteNodeId() const { return mRemoteNodeId; } + // Node vendor ID from the basic information cluster. In the AutoCommissioner, this is automatically set from report from the // kReadCommissioningInfo stage. // This must be set before calling PerformCommissioningStep for the kAttestationVerification step. @@ -328,6 +332,11 @@ class CommissioningParameters mDAC = MakeOptional(dac); return *this; } + CommissioningParameters & SetRemoteNodeId(NodeId id) + { + mRemoteNodeId = MakeOptional(id); + return *this; + } CommissioningParameters & SetRemoteVendorId(VendorId id) { mRemoteVendorId = MakeOptional(id); @@ -387,6 +396,16 @@ class CommissioningParameters return *this; } + // Check for matching fabric on target device by reading fabric list and looking for a + // fabricId and RootCert match. If a match is detected, then use GetNodeId() to + // access the nodeId for the device on the matching fabric. + bool GetCheckForMatchingFabric() const { return mCheckForMatchingFabric; } + CommissioningParameters & SetCheckForMatchingFabric(bool checkForMatchingFabric) + { + mCheckForMatchingFabric = checkForMatchingFabric; + return *this; + } + private: // Items that can be set by the commissioner Optional mFailsafeTimerSeconds; @@ -407,6 +426,7 @@ class CommissioningParameters Optional mAttestationSignature; Optional mPAI; Optional mDAC; + Optional mRemoteNodeId; Optional mRemoteVendorId; Optional mRemoteProductId; Optional mDefaultRegulatoryLocation; @@ -417,6 +437,7 @@ class CommissioningParameters Optional mAttemptWiFiNetworkScan; Optional mAttemptThreadNetworkScan; // This automatically gets set to false when a ThreadOperationalDataset is set Optional mSkipCommissioningComplete; + bool mCheckForMatchingFabric = false; }; struct RequestedCertificate @@ -491,6 +512,7 @@ struct ReadCommissioningInfo NetworkClusters network; BasicClusterInfo basic; GeneralCommissioningInfo general; + NodeId nodeId = kUndefinedNodeId; }; struct AttestationErrorInfo diff --git a/src/controller/java/AndroidOperationalCredentialsIssuer.cpp b/src/controller/java/AndroidOperationalCredentialsIssuer.cpp index e9808409da5d3c..76d5dcb1895d77 100644 --- a/src/controller/java/AndroidOperationalCredentialsIssuer.cpp +++ b/src/controller/java/AndroidOperationalCredentialsIssuer.cpp @@ -159,7 +159,9 @@ CHIP_ERROR AndroidOperationalCredentialsIssuer::CallbackGenerateNOCChain(const B jmethodID method; CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - err = JniReferences::GetInstance().FindMethod(env, mJavaObjectRef, "onNOCChainGenerationNeeded", "([B[B[B[B[B[B[B[B[B)V", + + err = JniReferences::GetInstance().FindMethod(env, mJavaObjectRef, "onNOCChainGenerationNeeded", + "(Lchip/devicecontroller/CSRInfo;Lchip/devicecontroller/AttestationInfo;)V", &method); if (err != CHIP_NO_ERROR) { @@ -219,17 +221,16 @@ CHIP_ERROR AndroidOperationalCredentialsIssuer::CallbackGenerateNOCChain(const B JniReferences::GetInstance().N2J_ByteArray(env, attestationChallenge.data(), attestationChallenge.size(), javaAttestationChallenge); - const ByteSpan & attestationElements = mAutoCommissioner->GetCommissioningParameters().GetAttestationElements().Value(); + const ByteSpan & attestationElements = mAutoCommissioner->GetAttestationElements(); jbyteArray javaAttestationElements; JniReferences::GetInstance().N2J_ByteArray(env, attestationElements.data(), attestationElements.size(), javaAttestationElements); - const ByteSpan & attestationNonce = mAutoCommissioner->GetCommissioningParameters().GetAttestationNonce().Value(); + const ByteSpan & attestationNonce = mAutoCommissioner->GetAttestationNonce(); jbyteArray javaAttestationNonce; JniReferences::GetInstance().N2J_ByteArray(env, attestationNonce.data(), attestationNonce.size(), javaAttestationNonce); - const ByteSpan & attestationElementsSignature = - mAutoCommissioner->GetCommissioningParameters().GetAttestationSignature().Value(); + const ByteSpan & attestationElementsSignature = mAutoCommissioner->GetAttestationSignature(); jbyteArray javaAttestationElementsSignature; JniReferences::GetInstance().N2J_ByteArray(env, attestationElementsSignature.data(), attestationElementsSignature.size(), javaAttestationElementsSignature); diff --git a/src/controller/java/BaseCHIPCluster-JNI.cpp b/src/controller/java/BaseCHIPCluster-JNI.cpp index e40670a13f13e8..830e757c46faf6 100644 --- a/src/controller/java/BaseCHIPCluster-JNI.cpp +++ b/src/controller/java/BaseCHIPCluster-JNI.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ @@ -14,3 +15,45 @@ JNI_METHOD(void, BaseChipCluster, deleteCluster)(JNIEnv * env, jobject self, jlo delete cluster; } } + +JNI_METHOD(jobject, BaseChipCluster, getCommandTimeout) +(JNIEnv * env, jobject self, jlong clusterPtr) +{ + chip::DeviceLayer::StackLock lock; + chip::Controller::ClusterBase * cluster = reinterpret_cast(clusterPtr); + + chip::Optional timeout = cluster->GetCommandTimeout(); + if (!timeout.HasValue()) + { + jobject emptyOptional = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, emptyOptional); + return emptyOptional; + } + + jobject timeoutOptional = nullptr; + jobject timeoutBoxed = nullptr; + jlong timeoutPrimitive = static_cast(timeout.Value().count()); + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Long", "(J)V", timeoutPrimitive, timeoutBoxed); + chip::JniReferences::GetInstance().CreateOptional(timeoutBoxed, timeoutOptional); + return timeoutOptional; +} + +JNI_METHOD(void, BaseChipCluster, setCommandTimeout) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject timeoutOptional) +{ + chip::DeviceLayer::StackLock lock; + chip::Controller::ClusterBase * cluster = reinterpret_cast(clusterPtr); + + jobject boxedLong = nullptr; + chip::JniReferences::GetInstance().GetOptionalValue(timeoutOptional, boxedLong); + + if (boxedLong != nullptr) + { + jlong timeoutMillis = chip::JniReferences::GetInstance().LongToPrimitive(boxedLong); + cluster->SetCommandTimeout(chip::MakeOptional(chip::System::Clock::Milliseconds32(static_cast(timeoutMillis)))); + } + else + { + cluster->SetCommandTimeout(chip::NullOptional); + } +} diff --git a/src/controller/java/templates/ChipClusters-java.zapt b/src/controller/java/templates/ChipClusters-java.zapt index e630dbb54b043c..43dcb4a9a209b5 100644 --- a/src/controller/java/templates/ChipClusters-java.zapt +++ b/src/controller/java/templates/ChipClusters-java.zapt @@ -68,6 +68,25 @@ public class ChipClusters { chipClusterPtr = initWithDevice(devicePtr, endpointId); } + /** + * Sets the timeout, in milliseconds, after which commands sent through this cluster will fail + * with a timeout (regardless of whether or not a response has been received). If set to an + * empty optional, the default timeout will be used. + */ + public void setCommandTimeout(Optional timeoutMillis) { + setCommandTimeout(chipClusterPtr, timeoutMillis); + } + + private native void setCommandTimeout(long clusterPtr, Optional timeoutMillis); + + /** Returns the current timeout (in milliseconds) for commands sent through this cluster. */ + public Optional getCommandTimeout() { + Optional timeout = getCommandTimeout(chipClusterPtr); + return timeout == null ? Optional.empty() : timeout; + } + + private native Optional getCommandTimeout(long clusterPtr); + public abstract long initWithDevice(long devicePtr, int endpointId); public native void deleteCluster(long chipClusterPtr); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index b3438e06c46c3e..bb39d141a53239 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -97,6 +97,25 @@ public BaseChipCluster(long devicePtr, int endpointId) { chipClusterPtr = initWithDevice(devicePtr, endpointId); } + /** + * Sets the timeout, in milliseconds, after which commands sent through this cluster will fail + * with a timeout (regardless of whether or not a response has been received). If set to an + * empty optional, the default timeout will be used. + */ + public void setCommandTimeout(Optional timeoutMillis) { + setCommandTimeout(chipClusterPtr, timeoutMillis); + } + + private native void setCommandTimeout(long clusterPtr, Optional timeoutMillis); + + /** Returns the current timeout (in milliseconds) for commands sent through this cluster. */ + public Optional getCommandTimeout() { + Optional timeout = getCommandTimeout(chipClusterPtr); + return timeout == null ? Optional.empty() : timeout; + } + + private native Optional getCommandTimeout(long clusterPtr); + public abstract long initWithDevice(long devicePtr, int endpointId); public native void deleteCluster(long chipClusterPtr); diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index d722a830577ed3..890c7fc8501c59 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -298,7 +298,7 @@ chip_python_wheel_action("chip-core") { py_package_reqs += [ "pyobjc-framework-corebluetooth" ] } else if (current_os == "linux") { py_package_reqs += [ - "dbus-python", + "dbus-python==1.2.18", "pygobject", ] } diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index fc2ec8ec20ba7d..36d6e343f52b13 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -408,9 +408,14 @@ def UpdateCachedData(self): endpointCache = attributeCache[endpoint] for cluster in tlvCache[endpoint]: + if cluster not in _ClusterIndex: + # + # #22599 tracks dealing with unknown clusters more + # gracefully so that clients can still access this data. + # + continue + clusterType = _ClusterIndex[cluster] - if (clusterType is None): - raise Exception("Cannot find cluster in cluster index") if (clusterType not in endpointCache): endpointCache[clusterType] = {} @@ -427,9 +432,6 @@ def UpdateCachedData(self): endpointCache[clusterType].SetDataVersion( clusterDataVersion) except Exception as ex: - logging.error( - f"Error converting TLV to Cluster Object for path: Endpoint = {endpoint}, cluster = {str(clusterType)}") - logging.error(f"|-- Exception: {repr(ex)}") decodedValue = ValueDecodeFailure( tlvCache[endpoint][cluster], ex) endpointCache[clusterType] = decodedValue @@ -438,27 +440,26 @@ def UpdateCachedData(self): for attribute in tlvCache[endpoint][cluster]: value = tlvCache[endpoint][cluster][attribute] + if (cluster, attribute) not in _AttributeIndex: + # + # #22599 tracks dealing with unknown clusters more + # gracefully so that clients can still access this data. + # + continue + attributeType = _AttributeIndex[( cluster, attribute)][0] - if (attributeType is None): - raise Exception( - "Cannot find attribute in attribute index") if (attributeType not in clusterCache): clusterCache[attributeType] = {} if (type(value) is ValueDecodeFailure): - logging.error( - f"For path: Endpoint = {endpoint}, Attribute = {str(attributeType)}, got IM Error: {str(value.Reason)}") clusterCache[attributeType] = value else: try: decodedValue = attributeType.FromTagDictOrRawValue( tlvCache[endpoint][cluster][attribute]) except Exception as ex: - logging.error( - f"Error converting TLV to Cluster Object for path: Endpoint = {endpoint}, Attribute = {str(attributeType)}") - logging.error(f"|-- Exception: {repr(ex)}") decodedValue = ValueDecodeFailure(value, ex) clusterCache[attributeType] = decodedValue diff --git a/src/controller/python/chip/clusters/attribute.cpp b/src/controller/python/chip/clusters/attribute.cpp index 488c1bc1c47521..0c90495ae4bf00 100644 --- a/src/controller/python/chip/clusters/attribute.cpp +++ b/src/controller/python/chip/clusters/attribute.cpp @@ -135,10 +135,7 @@ class ReadClientCallback : public ReadClient::Callback { version = aPath.mDataVersion.Value(); } - else - { - ChipLogError(DataManagement, "expect aPath has valid mDataVersion"); - } + gOnReadAttributeDataCallback(mAppContext, version, aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, to_underlying(aStatus.mStatus), buffer.get(), size); } diff --git a/src/credentials/DeviceAttestationConstructor.cpp b/src/credentials/DeviceAttestationConstructor.cpp index 8a13419bf5f699..6056ed1a0f9fb7 100644 --- a/src/credentials/DeviceAttestationConstructor.cpp +++ b/src/credentials/DeviceAttestationConstructor.cpp @@ -183,6 +183,8 @@ CHIP_ERROR ConstructAttestationElements(const ByteSpan & certificationDeclaratio ReturnErrorOnFailure(tlvWriter.Finalize()); attestationElements = attestationElements.SubSpan(0, tlvWriter.GetLengthWritten()); + VerifyOrReturnError(attestationElements.size() <= Credentials::kMaxRspLen, CHIP_ERROR_MESSAGE_TOO_LONG); + return CHIP_NO_ERROR; } @@ -218,6 +220,8 @@ CHIP_ERROR ConstructNOCSRElements(const ByteSpan & csr, const ByteSpan & csrNonc ReturnErrorOnFailure(tlvWriter.Finalize()); nocsrElements = nocsrElements.SubSpan(0, tlvWriter.GetLengthWritten()); + VerifyOrReturnError(nocsrElements.size() <= Credentials::kMaxRspLen, CHIP_ERROR_MESSAGE_TOO_LONG); + return CHIP_NO_ERROR; } diff --git a/src/credentials/DeviceAttestationConstructor.h b/src/credentials/DeviceAttestationConstructor.h index 87f1095792c0f9..b8404ef57577cc 100644 --- a/src/credentials/DeviceAttestationConstructor.h +++ b/src/credentials/DeviceAttestationConstructor.h @@ -23,6 +23,9 @@ namespace chip { namespace Credentials { +// As per specifications section 11.22.5.1. Constant RESP_MAX +constexpr size_t kMaxRspLen = 900; + // CSRNonce and AttestationNonce need to be this size constexpr size_t kExpectedAttestationNonceSize = 32; diff --git a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.h b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.h index e4f114bc4ab869..fbdcff4df3c79e 100644 --- a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.h +++ b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.h @@ -25,6 +25,8 @@ extern NSString * const kNetworkSSIDDefaultsKey; extern NSString * const kNetworkPasswordDefaultsKey; extern NSString * const kFabricIdKey; +typedef void (^DeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NSError * _Nullable error); + MTRDeviceController * _Nullable InitializeMTR(void); MTRDeviceController * _Nullable MTRRestartController(MTRDeviceController * controller); id _Nullable MTRGetDomainValueForKey(NSString * domain, NSString * key); @@ -36,12 +38,12 @@ uint64_t MTRGetLastPairedDeviceId(void); void MTRSetNextAvailableDeviceID(uint64_t id); void MTRSetDevicePaired(uint64_t id, BOOL paired); BOOL MTRIsDevicePaired(uint64_t id); -BOOL MTRGetConnectedDevice(MTRDeviceConnectionCallback completionHandler); -BOOL MTRGetConnectedDeviceWithID(uint64_t deviceId, MTRDeviceConnectionCallback completionHandler); +BOOL MTRGetConnectedDevice(DeviceConnectionCallback completionHandler); +BOOL MTRGetConnectedDeviceWithID(uint64_t deviceId, DeviceConnectionCallback completionHandler); void MTRUnpairDeviceWithID(uint64_t deviceId); MTRBaseDevice * _Nullable MTRGetDeviceBeingCommissioned(void); -@interface CHIPToolPersistentStorageDelegate : NSObject +@interface CHIPToolPersistentStorageDelegate : NSObject - (nullable NSData *)storageDataForKey:(NSString *)key; - (BOOL)setStorageData:(NSData *)value forKey:(NSString *)key; - (BOOL)removeStorageDataForKey:(NSString *)key; diff --git a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m index 49578370a62f63..8ecbda4a4b884e 100644 --- a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m +++ b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m @@ -76,9 +76,9 @@ void MTRSetNextAvailableDeviceID(uint64_t id) static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ CHIPToolPersistentStorageDelegate * storage = [[CHIPToolPersistentStorageDelegate alloc] init]; - __auto_type * factory = [MTRControllerFactory sharedInstance]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - if (![factory startup:factoryParams]) { + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + if (![factory startControllerFactory:factoryParams error:nil]) { return; } @@ -87,14 +87,14 @@ void MTRSetNextAvailableDeviceID(uint64_t id) return; } - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:keys fabricID:@(1) ipk:keys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:keys.ipk fabricID:@(1) nocSigner:keys]; params.vendorID = @(kTestVendorId); // We're not sure whether we have a fabric configured already; try as if // we did, and if not fall back to creating a new one. - sController = [factory startControllerOnExistingFabric:params]; + sController = [factory createControllerOnExistingFabric:params error:nil]; if (sController == nil) { - sController = [factory startControllerOnNewFabric:params]; + sController = [factory createControllerOnNewFabric:params error:nil]; } }); @@ -113,9 +113,9 @@ void MTRSetNextAvailableDeviceID(uint64_t id) [controller shutdown]; NSLog(@"Starting up the stack"); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:keys fabricID:@(1) ipk:keys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:keys.ipk fabricID:@(1) nocSigner:keys]; - sController = [[MTRControllerFactory sharedInstance] startControllerOnExistingFabric:params]; + sController = [[MTRDeviceControllerFactory sharedInstance] createControllerOnExistingFabric:params error:nil]; return sController; } @@ -129,20 +129,21 @@ uint64_t MTRGetLastPairedDeviceId(void) return deviceId; } -BOOL MTRGetConnectedDevice(MTRDeviceConnectionCallback completionHandler) +BOOL MTRGetConnectedDevice(DeviceConnectionCallback completionHandler) { - MTRDeviceController * controller = InitializeMTR(); + InitializeMTR(); // Let's use the last device that was paired uint64_t deviceId = MTRGetLastPairedDeviceId(); - return [controller getBaseDevice:deviceId queue:dispatch_get_main_queue() completion:completionHandler]; + + return MTRGetConnectedDeviceWithID(deviceId, completionHandler); } MTRBaseDevice * MTRGetDeviceBeingCommissioned(void) { NSError * error; MTRDeviceController * controller = InitializeMTR(); - MTRBaseDevice * device = [controller getDeviceBeingCommissioned:MTRGetLastPairedDeviceId() error:&error]; + MTRBaseDevice * device = [controller deviceBeingCommissionedWithNodeID:@(MTRGetLastPairedDeviceId()) error:&error]; if (error) { NSLog(@"Error retrieving device being commissioned for deviceId %llu", MTRGetLastPairedDeviceId()); return nil; @@ -150,11 +151,16 @@ BOOL MTRGetConnectedDevice(MTRDeviceConnectionCallback completionHandler) return device; } -BOOL MTRGetConnectedDeviceWithID(uint64_t deviceId, MTRDeviceConnectionCallback completionHandler) +BOOL MTRGetConnectedDeviceWithID(uint64_t deviceId, DeviceConnectionCallback completionHandler) { MTRDeviceController * controller = InitializeMTR(); - return [controller getBaseDevice:deviceId queue:dispatch_get_main_queue() completion:completionHandler]; + // We can simplify this now that devices can be gotten sync, but for now just do the async dispatch. + dispatch_async(dispatch_get_main_queue(), ^{ + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(deviceId) controller:controller]; + completionHandler(device, nil); + }); + return YES; } BOOL MTRIsDevicePaired(uint64_t deviceId) @@ -205,12 +211,12 @@ void MTRUnpairDeviceWithID(uint64_t deviceId) @implementation CHIPToolPersistentStorageDelegate -// MARK: MTRPersistentStorageDelegate +// MARK: MTRStorage - (nullable NSData *)storageDataForKey:(NSString *)key { NSData * value = MTRGetDomainValueForKey(MTRToolDefaultsDomain, key); - NSLog(@"MTRPersistentStorageDelegate Get Value for Key: %@, value %@", key, value); + NSLog(@"MTRStorage Get Value for Key: %@, value %@", key, value); return value; } diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m index 8623442c82096e..8aa6036e08523d 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m @@ -272,7 +272,7 @@ - (void)fetchFabricsList queue:dispatch_get_main_queue()]; [self updateResult:[NSString stringWithFormat:@"readAttributeFabrics command sent."] isError:NO]; MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = @NO; + params.fabricFiltered = NO; [cluster readAttributeFabricsWithParams:params completion:^(NSArray * _Nullable fabricsList, NSError * _Nullable error) { diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.h b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.h index 77d143c2c5a2bb..85a2f1f133f2f5 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.h +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.h @@ -21,6 +21,6 @@ #import @interface QRCodeViewController - : UIViewController + : UIViewController @end diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m index ec4ce5d69052ca..829b8e0bae6d43 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m @@ -489,7 +489,7 @@ - (void)setVendorIDOnAccessory } } -// MARK: MTRDevicePairingDelegate +// MARK: MTRDeviceControllerDelegate - (void)onPairingComplete:(NSError * _Nullable)error { if (error != nil) { @@ -506,9 +506,9 @@ - (void)onPairingComplete:(NSError * _Nullable)error } else { MTRCommissioningParameters * params = [[MTRCommissioningParameters alloc] init]; params.deviceAttestationDelegate = [[CHIPToolDeviceAttestationDelegate alloc] initWithViewController:self]; - params.failSafeExpiryTimeoutSecs = @600; + params.failSafeExpiryTimeout = @600; NSError * error; - if (![controller commissionDevice:deviceId commissioningParams:params error:&error]) { + if (![controller commissionNodeWithID:@(deviceId) commissioningParams:params error:&error]) { NSLog(@"Failed to commission Device %llu, with error %@", deviceId, error); } } @@ -674,11 +674,11 @@ - (void)commissionWithSSID:(NSString *)ssid password:(NSString *)password params.wifiSSID = [ssid dataUsingEncoding:NSUTF8StringEncoding]; params.wifiCredentials = [password dataUsingEncoding:NSUTF8StringEncoding]; params.deviceAttestationDelegate = [[CHIPToolDeviceAttestationDelegate alloc] initWithViewController:self]; - params.failSafeExpiryTimeoutSecs = @600; + params.failSafeExpiryTimeout = @600; uint64_t deviceId = MTRGetNextAvailableDeviceID() - 1; - if (![controller commissionDevice:deviceId commissioningParams:params error:&error]) { + if (![controller commissionNodeWithID:@(deviceId) commissioningParams:params error:&error]) { NSLog(@"Failed to commission Device %llu, with error %@", deviceId, error); } } @@ -814,9 +814,18 @@ - (void)handleRendezVousDefault:(NSString *)payload // restart the Matter Stack before pairing (for reliability + testing restarts) [self _restartMatterStack]; - if ([self.chipController pairDevice:deviceID onboardingPayload:payload error:&error]) { + __auto_type * setupPayload = [MTRSetupPayload setupPayloadWithOnboardingPayload:payload error:&error]; + if (setupPayload == nil) { + NSLog(@"Could not parse setup payload: %@", [error localizedDescription]); + return; + } + + ; + if ([self.chipController setupCommissioningSessionWithPayload:setupPayload newNodeID:@(deviceID) error:&error]) { deviceID++; MTRSetNextAvailableDeviceID(deviceID); + } else { + NSLog(@"Could not start commissioning session setup: %@", [error localizedDescription]); } } diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m index c0d7f16d15e3cf..befbe25f4ba6d6 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m @@ -222,10 +222,10 @@ - (void)reportFromUserEnteredSettings if (MTRGetConnectedDevice(^(MTRBaseDevice * _Nullable chipDevice, NSError * _Nullable error) { if (chipDevice) { // Use a wildcard subscription + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalSeconds) + maxInterval:@(maxIntervalSeconds)]; [chipDevice subscribeWithQueue:dispatch_get_main_queue() - minInterval:@(minIntervalSeconds) - maxInterval:@(maxIntervalSeconds) - params:nil + params:params attributeCacheContainer:nil attributeReportHandler:^(NSArray * _Nullable reports) { if (!reports) diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.h b/src/darwin/Framework/CHIP/MTRBaseDevice.h index 27f7349207580e..0f775df57ec95f 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.h @@ -126,12 +126,12 @@ extern NSString * const MTRArrayValueType; + (instancetype)new NS_UNAVAILABLE; /** - * Initialize the device object with the given node id and controller. This + * Create a device object with the given node id and controller. This * will always succeed, even if there is no such node id on the controller's * fabric, but attempts to actually use the MTRBaseDevice will fail * (asynchronously) in that case. */ -- (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller; ++ (instancetype)deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller; /** * Subscribe to receive attribute reports for everything (all endpoints, all @@ -173,9 +173,7 @@ extern NSString * const MTRArrayValueType; * attempts fail. */ - (void)subscribeWithQueue:(dispatch_queue_t)queue - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - params:(MTRSubscribeParams * _Nullable)params + params:(MTRSubscribeParams *)params attributeCacheContainer:(MTRAttributeCacheContainer * _Nullable)attributeCacheContainer attributeReportHandler:(MTRDeviceReportHandler _Nullable)attributeReportHandler eventReportHandler:(MTRDeviceReportHandler _Nullable)eventReportHandler @@ -184,14 +182,21 @@ extern NSString * const MTRArrayValueType; resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduled; /** - * Read attribute in a designated attribute path + * Reads the given attribute path from the device. + * + * nil values for endpointID, clusterID, attributeID indicate wildcards + * (e.g. nil attributeID means "read all the attributes from the endpoint(s) and + * cluster(s) that match endpointID/clusterID"). + * + * A non-nil attributeID along with a nil clusterID will only succeed if the + * attribute ID is for a global attribute that applies to all clusters. */ -- (void)readAttributeWithEndpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - params:(MTRReadParams * _Nullable)params - queue:(dispatch_queue_t)queue - completion:(MTRDeviceResponseHandler)completion; +- (void)readAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID + clusterID:(NSNumber * _Nullable)clusterID + attributeID:(NSNumber * _Nullable)attributeID + params:(MTRReadParams * _Nullable)params + queue:(dispatch_queue_t)queue + completion:(MTRDeviceResponseHandler)completion; /** * Write to attribute in a designated attribute path @@ -203,8 +208,8 @@ extern NSString * const MTRArrayValueType; * * @param completion response handler will receive either values or error. * - * Received values are an NSArray object with response-value element as described in - * readAttributeWithEndpointID:clusterID:attributeID:queue:completion:. + * Received values are documented in the definition of + * MTRDeviceResponseHandler. */ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID @@ -235,17 +240,22 @@ extern NSString * const MTRArrayValueType; completion:(MTRDeviceResponseHandler)completion; /** - * Subscribe an attribute in a designated attribute path + * Subscribes to the given attribute path on the device. + * + * nil values for endpointID, clusterID, attributeID indicate wildcards + * (e.g. nil attributeID means "read all the attributes from the endpoint(s) and + * cluster(s) that match endpointID/clusterID"). + * + * A non-nil attributeID along with a nil clusterID will only succeed if the + * attribute ID is for a global attribute that applies to all clusters. */ -- (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - params:(MTRSubscribeParams * _Nullable)params - queue:(dispatch_queue_t)queue - reportHandler:(MTRDeviceResponseHandler)reportHandler - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished; +- (void)subscribeAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID + clusterID:(NSNumber * _Nullable)clusterID + attributeID:(NSNumber * _Nullable)attributeID + params:(MTRSubscribeParams *)params + queue:(dispatch_queue_t)queue + reportHandler:(MTRDeviceResponseHandler)reportHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished; /** * Deregister all local report handlers for a remote device @@ -278,10 +288,26 @@ extern NSString * const MTRArrayValueType; @end -@interface MTRAttributePath : NSObject -@property (nonatomic, readonly, strong, nonnull) NSNumber * endpoint; -@property (nonatomic, readonly, strong, nonnull) NSNumber * cluster; -@property (nonatomic, readonly, strong, nonnull) NSNumber * attribute; +/** + * A path indicating a specific cluster on a device (i.e. without any + * wildcards). + */ +@interface MTRClusterPath : NSObject +@property (nonatomic, readonly, copy) NSNumber * endpoint; +@property (nonatomic, readonly, copy) NSNumber * cluster; + ++ (instancetype)clusterPathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; +@end + +/** + * A path indicating a specific attribute on a device (i.e. without any + * wildcards). + */ +@interface MTRAttributePath : MTRClusterPath +@property (nonatomic, readonly, copy) NSNumber * attribute; + (instancetype)attributePathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID @@ -291,10 +317,13 @@ extern NSString * const MTRArrayValueType; + (instancetype)new NS_UNAVAILABLE; @end -@interface MTREventPath : NSObject -@property (nonatomic, readonly, strong, nonnull) NSNumber * endpoint; -@property (nonatomic, readonly, strong, nonnull) NSNumber * cluster; -@property (nonatomic, readonly, strong, nonnull) NSNumber * event; +/** + * A path indicating a specific event that can be emitted on a device + * (i.e. without any wildcards). There can be multiple instances of actual + * events for a given event path. + */ +@interface MTREventPath : MTRClusterPath +@property (nonatomic, readonly, copy) NSNumber * event; + (instancetype)eventPathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID eventID:(NSNumber *)eventID; @@ -302,10 +331,12 @@ extern NSString * const MTRArrayValueType; + (instancetype)new NS_UNAVAILABLE; @end -@interface MTRCommandPath : NSObject -@property (nonatomic, readonly, strong, nonnull) NSNumber * endpoint; -@property (nonatomic, readonly, strong, nonnull) NSNumber * cluster; -@property (nonatomic, readonly, strong, nonnull) NSNumber * command; +/** + * A path indicating a specific command on a device (i.e. without any + * wildcards). + */ +@interface MTRCommandPath : MTRClusterPath +@property (nonatomic, readonly, copy) NSNumber * command; + (instancetype)commandPathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID commandID:(NSNumber *)commandID; @@ -314,25 +345,27 @@ extern NSString * const MTRArrayValueType; @end @interface MTRAttributeReport : NSObject -@property (nonatomic, readonly, strong, nonnull) MTRAttributePath * path; +@property (nonatomic, readonly, copy) MTRAttributePath * path; // value is nullable because nullable attributes can have nil as value. -@property (nonatomic, readonly, strong, nullable) id value; +@property (nonatomic, readonly, copy, nullable) id value; // If this specific path resulted in an error, the error (in the // MTRInteractionErrorDomain or MTRErrorDomain) that corresponds to this // path. -@property (nonatomic, readonly, strong, nullable) NSError * error; +@property (nonatomic, readonly, copy, nullable) NSError * error; @end @interface MTREventReport : NSObject -@property (nonatomic, readonly, strong, nonnull) MTREventPath * path; -@property (nonatomic, readonly, strong, nonnull) NSNumber * eventNumber; // chip::EventNumber type (uint64_t) -@property (nonatomic, readonly, strong, nonnull) NSNumber * priority; // chip::app::PriorityLevel type (uint8_t) -@property (nonatomic, readonly, strong, nonnull) NSNumber * timestamp; // chip::app::Timestamp.mValue type (uint64_t) -@property (nonatomic, readonly, strong, nullable) id value; +@property (nonatomic, readonly, copy) MTREventPath * path; +@property (nonatomic, readonly, copy) NSNumber * eventNumber; // EventNumber type (uint64_t) +@property (nonatomic, readonly, copy) NSNumber * priority; // PriorityLevel type (uint8_t) +@property (nonatomic, readonly, copy) NSNumber * timestamp; // Timestamp type (uint64_t) +// An instance of one of the event payload interfaces. +@property (nonatomic, readonly, copy) id value; + // If this specific path resulted in an error, the error (in the // MTRInteractionErrorDomain or MTRErrorDomain) that corresponds to this // path. -@property (nonatomic, readonly, strong, nullable) NSError * error; +@property (nonatomic, readonly, copy, nullable) NSError * error; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index deb08ece22dc55..c01234a7ffd5e7 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -251,6 +251,13 @@ - (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceControlle return self; } ++ (instancetype)deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller +{ + // Indirect through the controller to give it a chance to create an + // MTRBaseDeviceOverXPC instead of just an MTRBaseDevice. + return [controller baseDeviceForNodeID:nodeID]; +} + - (chip::DeviceProxy * _Nullable)paseDevice { return _cppPASEDevice; @@ -299,9 +306,7 @@ - (void)invalidateCASESession } // anonymous namespace - (void)subscribeWithQueue:(dispatch_queue_t)queue - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - params:(nullable MTRSubscribeParams *)params + params:(MTRSubscribeParams *)params attributeCacheContainer:(MTRAttributeCacheContainer * _Nullable)attributeCacheContainer attributeReportHandler:(MTRDeviceReportHandler _Nullable)attributeReportHandler eventReportHandler:(MTRDeviceReportHandler _Nullable)eventReportHandler @@ -335,13 +340,14 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue auto attributePath = std::make_unique(); auto eventPath = std::make_unique(); ReadPrepareParams readParams(session.Value()); - readParams.mMinIntervalFloorSeconds = [minInterval unsignedShortValue]; - readParams.mMaxIntervalCeilingSeconds = [maxInterval unsignedShortValue]; + readParams.mMinIntervalFloorSeconds = [params.minInterval unsignedShortValue]; + readParams.mMaxIntervalCeilingSeconds = [params.maxInterval unsignedShortValue]; readParams.mpAttributePathParamsList = attributePath.get(); readParams.mAttributePathParamsListSize = 1; readParams.mpEventPathParamsList = eventPath.get(); readParams.mEventPathParamsListSize = 1; - readParams.mKeepSubscriptions = [params.keepPreviousSubscriptions boolValue]; + readParams.mIsFabricFiltered = params.fabricFiltered; + readParams.mKeepSubscriptions = params.keepPreviousSubscriptions; std::unique_ptr callback; std::unique_ptr readClient; @@ -366,7 +372,7 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue } CHIP_ERROR err; - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { err = readClient->SendRequest(readParams); } else { // SendAutoResubscribeRequest cleans up the params, even on failure. @@ -771,12 +777,12 @@ void OnDeallocatePaths(chip::app::ReadPrepareParams && aReadPrepareParams) overr Platform::UniquePtr mReadClient; }; -- (void)readAttributeWithEndpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - attributeID:(NSNumber *)attributeID - params:(MTRReadParams * _Nullable)params - queue:(dispatch_queue_t)queue - completion:(MTRDeviceResponseHandler)completion +- (void)readAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID + clusterID:(NSNumber * _Nullable)clusterID + attributeID:(NSNumber * _Nullable)attributeID + params:(MTRReadParams * _Nullable)params + queue:(dispatch_queue_t)queue + completion:(MTRDeviceResponseHandler)completion { endpointID = (endpointID == nil) ? nil : [endpointID copy]; clusterID = (clusterID == nil) ? nil : [clusterID copy]; @@ -831,7 +837,7 @@ new MTRDataValueDictionaryCallbackBridge(queue, self, completion, chip::app::ReadPrepareParams readParams(session); readParams.mpAttributePathParamsList = &attributePath; readParams.mAttributePathParamsListSize = 1; - readParams.mIsFabricFiltered = params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]; + readParams.mIsFabricFiltered = params.fabricFiltered; auto onDone = [resultArray, resultSuccess, resultFailure, context, successCb, failureCb]( BufferedReadAttributeCallback * callback) { @@ -1114,15 +1120,13 @@ new MTRDataValueDictionaryCallbackBridge(queue, self, completion, }); } -- (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - params:(MTRSubscribeParams * _Nullable)params - queue:(dispatch_queue_t)queue - reportHandler:(MTRDeviceResponseHandler)reportHandler - subscriptionEstablished:(MTRSubscriptionEstablishedHandler)subscriptionEstablished +- (void)subscribeAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID + clusterID:(NSNumber * _Nullable)clusterID + attributeID:(NSNumber * _Nullable)attributeID + params:(MTRSubscribeParams *)params + queue:(dispatch_queue_t)queue + reportHandler:(MTRDeviceResponseHandler)reportHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler)subscriptionEstablished { if (self.isPASEDevice) { // We don't support subscriptions over PASE. @@ -1136,8 +1140,6 @@ - (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID endpointID = (endpointID == nil) ? nil : [endpointID copy]; clusterID = (clusterID == nil) ? nil : [clusterID copy]; attributeID = (attributeID == nil) ? nil : [attributeID copy]; - minInterval = (minInterval == nil) ? nil : [minInterval copy]; - maxInterval = (maxInterval == nil) ? nil : [maxInterval copy]; params = (params == nil) ? nil : [params copy]; [self.deviceController @@ -1211,12 +1213,10 @@ - (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID chip::app::ReadPrepareParams readParams(session.Value()); readParams.mpAttributePathParamsList = container.pathParams; readParams.mAttributePathParamsListSize = 1; - readParams.mMinIntervalFloorSeconds = static_cast([minInterval unsignedShortValue]); - readParams.mMaxIntervalCeilingSeconds = static_cast([maxInterval unsignedShortValue]); - readParams.mIsFabricFiltered - = (params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - readParams.mKeepSubscriptions - = (params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + readParams.mMinIntervalFloorSeconds = static_cast([params.minInterval unsignedShortValue]); + readParams.mMaxIntervalCeilingSeconds = static_cast([params.maxInterval unsignedShortValue]); + readParams.mIsFabricFiltered = params.fabricFiltered; + readParams.mKeepSubscriptions = params.keepPreviousSubscriptions; auto onDone = [container](BufferedReadAttributeCallback * callback) { [container onDone]; @@ -1232,7 +1232,7 @@ - (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID auto readClient = Platform::New( engine, exchangeManager, callback->GetBufferedCallback(), chip::app::ReadClient::InteractionType::Subscribe); - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { err = readClient->SendRequest(readParams); } else { err = readClient->SendAutoResubscribeRequest(std::move(readParams)); @@ -1453,12 +1453,63 @@ + (id)CHIPEncodeAndDecodeNSObject:(id)object @end -@implementation MTRAttributePath -- (instancetype)initWithPath:(const ConcreteDataAttributePath &)path +@interface MTRClusterPath () +- (instancetype)initWithPath:(const ConcreteClusterPath &)path; +@end + +@implementation MTRClusterPath +- (instancetype)initWithPath:(const ConcreteClusterPath &)path { if (self = [super init]) { _endpoint = @(path.mEndpointId); _cluster = @(path.mClusterId); + } + return self; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@" endpoint %u cluster %u", (uint16_t) _endpoint.unsignedShortValue, + (uint32_t) _cluster.unsignedLongValue]; +} + ++ (instancetype)clusterPathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID +{ + ConcreteClusterPath path(static_cast([endpointID unsignedShortValue]), + static_cast([clusterID unsignedLongValue])); + + return [[MTRClusterPath alloc] initWithPath:path]; +} + +- (BOOL)isEqualToClusterPath:(MTRClusterPath *)clusterPath +{ + return [_endpoint isEqualToNumber:clusterPath.endpoint] && [_cluster isEqualToNumber:clusterPath.cluster]; +} + +- (BOOL)isEqual:(id)object +{ + if (![object isKindOfClass:[self class]]) { + return NO; + } + return [self isEqualToClusterPath:object]; +} + +- (NSUInteger)hash +{ + return _endpoint.unsignedShortValue ^ _cluster.unsignedLongValue; +} + +- (id)copyWithZone:(NSZone *)zone +{ + return [MTRClusterPath clusterPathWithEndpointID:_endpoint clusterID:_cluster]; +} + +@end + +@implementation MTRAttributePath +- (instancetype)initWithPath:(const ConcreteDataAttributePath &)path +{ + if (self = [super initWithPath:path]) { _attribute = @(path.mAttributeId); } return self; @@ -1467,7 +1518,7 @@ - (instancetype)initWithPath:(const ConcreteDataAttributePath &)path - (NSString *)description { return [NSString stringWithFormat:@" endpoint %u cluster %u attribute %u", - (uint16_t) _endpoint.unsignedShortValue, (uint32_t) _cluster.unsignedLongValue, + (uint16_t) self.endpoint.unsignedShortValue, (uint32_t) self.cluster.unsignedLongValue, (uint32_t) _attribute.unsignedLongValue]; } @@ -1484,8 +1535,7 @@ ConcreteDataAttributePath path(static_cast([endpointID unsigne - (BOOL)isEqualToAttributePath:(MTRAttributePath *)attributePath { - return [_endpoint isEqualToNumber:attributePath.endpoint] && [_cluster isEqualToNumber:attributePath.cluster] && - [_attribute isEqualToNumber:attributePath.attribute]; + return [self isEqualToClusterPath:attributePath] && [_attribute isEqualToNumber:attributePath.attribute]; } - (BOOL)isEqual:(id)object @@ -1498,21 +1548,19 @@ - (BOOL)isEqual:(id)object - (NSUInteger)hash { - return _endpoint.unsignedShortValue ^ _cluster.unsignedLongValue ^ _attribute.unsignedLongValue; + return self.endpoint.unsignedShortValue ^ self.cluster.unsignedLongValue ^ _attribute.unsignedLongValue; } - (id)copyWithZone:(NSZone *)zone { - return [MTRAttributePath attributePathWithEndpointID:_endpoint clusterID:_cluster attributeID:_attribute]; + return [MTRAttributePath attributePathWithEndpointID:self.endpoint clusterID:self.cluster attributeID:_attribute]; } @end @implementation MTREventPath - (instancetype)initWithPath:(const ConcreteEventPath &)path { - if (self = [super init]) { - _endpoint = @(path.mEndpointId); - _cluster = @(path.mClusterId); + if (self = [super initWithPath:path]) { _event = @(path.mEventId); } return self; @@ -1525,14 +1573,17 @@ ConcreteEventPath path(static_cast([endpointID unsignedShortVa return [[MTREventPath alloc] initWithPath:path]; } + +- (id)copyWithZone:(NSZone *)zone +{ + return [MTREventPath eventPathWithEndpointID:self.endpoint clusterID:self.cluster eventID:_event]; +} @end @implementation MTRCommandPath - (instancetype)initWithPath:(const ConcreteCommandPath &)path { - if (self = [super init]) { - _endpoint = @(path.mEndpointId); - _cluster = @(path.mClusterId); + if (self = [super initWithPath:path]) { _command = @(path.mCommandId); } return self; @@ -1545,10 +1596,15 @@ ConcreteCommandPath path(static_cast([endpointID unsignedShort return [[MTRCommandPath alloc] initWithPath:path]; } + +- (id)copyWithZone:(NSZone *)zone +{ + return [MTRCommandPath commandPathWithEndpointID:self.endpoint clusterID:self.cluster commandID:_command]; +} @end @implementation MTRAttributeReport -- (instancetype)initWithPath:(const ConcreteDataAttributePath &)path value:(nullable id)value error:(nullable NSError *)error +- (instancetype)initWithPath:(const ConcreteDataAttributePath &)path value:(id _Nullable)value error:(NSError * _Nullable)error { if (self = [super init]) { _path = [[MTRAttributePath alloc] initWithPath:path]; @@ -1564,8 +1620,8 @@ - (instancetype)initWithPath:(const ConcreteEventPath &)path eventNumber:(NSNumber *)eventNumber priority:(NSNumber *)priority timestamp:(NSNumber *)timestamp - value:(nullable id)value - error:(nullable NSError *)error + value:(id _Nullable)value + error:(NSError * _Nullable)error { if (self = [super init]) { _path = [[MTREventPath alloc] initWithPath:path]; diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h index 3acfb162459393..3dc8cb9bf875bf 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h @@ -54,11 +54,19 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign, readonly) chip::NodeId nodeID; /** - * Controllers are created via the MTRControllerFactory object. + * Controllers are created via the MTRDeviceControllerFactory object. */ - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; +/** + * Initialize the device object with the given node id and controller. This + * will always succeed, even if there is no such node id on the controller's + * fabric, but attempts to actually use the MTRBaseDevice will fail + * (asynchronously) in that case. + */ +- (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller; + @end @interface MTRAttributePath () @@ -75,8 +83,8 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRAttributeReport () - (instancetype)initWithPath:(const chip::app::ConcreteDataAttributePath &)path - value:(nullable id)value - error:(nullable NSError *)error; + value:(id _Nullable)value + error:(NSError * _Nullable)error; @end @interface MTREventReport () @@ -84,8 +92,8 @@ NS_ASSUME_NONNULL_BEGIN eventNumber:(NSNumber *)eventNumber priority:(NSNumber *)priority timestamp:(NSNumber *)timestamp - value:(nullable id)value - error:(nullable NSError *)error; + value:(id _Nullable)value + error:(NSError * _Nullable)error; @end // Exported utility function diff --git a/src/darwin/Framework/CHIP/MTRCertificates.h b/src/darwin/Framework/CHIP/MTRCertificates.h index c9c03c806be2b7..d384c4486d17c0 100644 --- a/src/darwin/Framework/CHIP/MTRCertificates.h +++ b/src/darwin/Framework/CHIP/MTRCertificates.h @@ -20,6 +20,9 @@ #import +typedef NSData MTRCertificateDERBytes; +typedef NSData MTRCertificateTLVBytes; + NS_ASSUME_NONNULL_BEGIN @protocol MTRKeypair; @@ -27,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRCertificates : NSObject /** - * Generate a root (self-signed) X.509 DER encoded certificate that has the + * Create a root (self-signed) X.509 DER encoded certificate that has the * right fields to be a valid Matter root certificate. * * If issuerID is nil, a random issuer id is generated. Otherwise the provided @@ -39,13 +42,13 @@ NS_ASSUME_NONNULL_BEGIN * On failure returns nil and if "error" is not null sets *error to the relevant * error. */ -+ (nullable NSData *)generateRootCertificate:(id)keypair - issuerID:(nullable NSNumber *)issuerID - fabricID:(nullable NSNumber *)fabricID - error:(NSError * __autoreleasing _Nullable * _Nullable)error; ++ (MTRCertificateDERBytes * _Nullable)createRootCertificate:(id)keypair + issuerID:(NSNumber * _Nullable)issuerID + fabricID:(NSNumber * _Nullable)fabricID + error:(NSError * __autoreleasing _Nullable * _Nullable)error; /** - * Generate an intermediate X.509 DER encoded certificate that has the + * Create an intermediate X.509 DER encoded certificate that has the * right fields to be a valid Matter intermediate certificate. * * If issuerID is nil, a random issuer id is generated. Otherwise the provided @@ -57,15 +60,15 @@ NS_ASSUME_NONNULL_BEGIN * On failure returns nil and if "error" is not null sets *error to the relevant * error. */ -+ (nullable NSData *)generateIntermediateCertificate:(id)rootKeypair - rootCertificate:(NSData *)rootCertificate - intermediatePublicKey:(SecKeyRef)intermediatePublicKey - issuerID:(nullable NSNumber *)issuerID - fabricID:(nullable NSNumber *)fabricID - error:(NSError * __autoreleasing _Nullable * _Nullable)error; ++ (MTRCertificateDERBytes * _Nullable)createIntermediateCertificate:(id)rootKeypair + rootCertificate:(MTRCertificateDERBytes *)rootCertificate + intermediatePublicKey:(SecKeyRef)intermediatePublicKey + issuerID:(NSNumber * _Nullable)issuerID + fabricID:(NSNumber * _Nullable)fabricID + error:(NSError * __autoreleasing _Nullable * _Nullable)error; /** - * Generate an X.509 DER encoded certificate that has the + * Create an X.509 DER encoded certificate that has the * right fields to be a valid Matter operational certificate. * * signingKeypair and signingCertificate are the root or intermediate that is @@ -85,13 +88,13 @@ NS_ASSUME_NONNULL_BEGIN * On failure returns nil and if "error" is not null sets *error to the relevant * error. */ -+ (nullable NSData *)generateOperationalCertificate:(id)signingKeypair - signingCertificate:(NSData *)signingCertificate - operationalPublicKey:(SecKeyRef)operationalPublicKey - fabricID:(NSNumber *)fabricID - nodeID:(NSNumber *)nodeID - caseAuthenticatedTags:(NSArray * _Nullable)caseAuthenticatedTags - error:(NSError * __autoreleasing _Nullable * _Nullable)error; ++ (MTRCertificateDERBytes * _Nullable)createOperationalCertificate:(id)signingKeypair + signingCertificate:(MTRCertificateDERBytes *)signingCertificate + operationalPublicKey:(SecKeyRef)operationalPublicKey + fabricID:(NSNumber *)fabricID + nodeID:(NSNumber *)nodeID + caseAuthenticatedTags:(NSArray * _Nullable)caseAuthenticatedTags + error:(NSError * __autoreleasing _Nullable * _Nullable)error; /** * Check whether the given keypair's public key matches the given certificate's @@ -107,7 +110,7 @@ NS_ASSUME_NONNULL_BEGIN * of having the same public key and the same subject DN. Returns NO if public * keys or subject DNs cannot be extracted from the certificates. */ -+ (BOOL)isCertificate:(NSData *)certificate1 equalTo:(NSData *)certificate2; ++ (BOOL)isCertificate:(MTRCertificateDERBytes *)certificate1 equalTo:(MTRCertificateDERBytes *)certificate2; /** * Generate a PKCS#10 certificate signing request from a MTRKeypair. This can @@ -122,8 +125,8 @@ NS_ASSUME_NONNULL_BEGIN * On failure returns nil and if "error" is not null sets *error to the relevant * error. */ -+ (nullable NSData *)generateCertificateSigningRequest:(id)keypair - error:(NSError * __autoreleasing _Nullable * _Nullable)error; ++ (NSData * _Nullable)createCertificateSigningRequest:(id)keypair + error:(NSError * __autoreleasing _Nullable * _Nullable)error; /** * Convert the given X.509v3 DER encoded certificate to the Matter certificate @@ -133,7 +136,7 @@ NS_ASSUME_NONNULL_BEGIN * as a DER encoded X.509 certificate, or if the certificate cannot be * represented in the Matter certificate format). */ -+ (nullable NSData *)convertX509Certificate:(NSData *)x509Certificate; ++ (MTRCertificateTLVBytes * _Nullable)convertX509Certificate:(MTRCertificateDERBytes *)x509Certificate; @end diff --git a/src/darwin/Framework/CHIP/MTRCertificates.mm b/src/darwin/Framework/CHIP/MTRCertificates.mm index 8ebb033b8ca029..66ffecfc770b49 100644 --- a/src/darwin/Framework/CHIP/MTRCertificates.mm +++ b/src/darwin/Framework/CHIP/MTRCertificates.mm @@ -31,10 +31,10 @@ @implementation MTRCertificates -+ (nullable NSData *)generateRootCertificate:(id)keypair - issuerID:(nullable NSNumber *)issuerID - fabricID:(nullable NSNumber *)fabricID - error:(NSError * __autoreleasing *)error ++ (MTRCertificateDERBytes * _Nullable)createRootCertificate:(id)keypair + issuerID:(NSNumber * _Nullable)issuerID + fabricID:(NSNumber * _Nullable)fabricID + error:(NSError * __autoreleasing *)error { NSLog(@"Generating root certificate"); @@ -53,12 +53,12 @@ + (nullable NSData *)generateRootCertificate:(id)keypair return rootCert; } -+ (nullable NSData *)generateIntermediateCertificate:(id)rootKeypair - rootCertificate:(NSData *)rootCertificate - intermediatePublicKey:(SecKeyRef)intermediatePublicKey - issuerID:(nullable NSNumber *)issuerID - fabricID:(nullable NSNumber *)fabricID - error:(NSError * __autoreleasing *)error ++ (MTRCertificateDERBytes * _Nullable)createIntermediateCertificate:(id)rootKeypair + rootCertificate:(MTRCertificateDERBytes *)rootCertificate + intermediatePublicKey:(SecKeyRef)intermediatePublicKey + issuerID:(NSNumber * _Nullable)issuerID + fabricID:(NSNumber * _Nullable)fabricID + error:(NSError * __autoreleasing *)error { NSLog(@"Generating intermediate certificate"); @@ -78,13 +78,13 @@ + (nullable NSData *)generateIntermediateCertificate:(id)rootKeypair return intermediate; } -+ (nullable NSData *)generateOperationalCertificate:(id)signingKeypair - signingCertificate:(NSData *)signingCertificate - operationalPublicKey:(SecKeyRef)operationalPublicKey - fabricID:(NSNumber *)fabricID - nodeID:(NSNumber *)nodeID - caseAuthenticatedTags:(NSArray * _Nullable)caseAuthenticatedTags - error:(NSError * __autoreleasing _Nullable * _Nullable)error ++ (MTRCertificateDERBytes * _Nullable)createOperationalCertificate:(id)signingKeypair + signingCertificate:(MTRCertificateDERBytes *)signingCertificate + operationalPublicKey:(SecKeyRef)operationalPublicKey + fabricID:(NSNumber *)fabricID + nodeID:(NSNumber *)nodeID + caseAuthenticatedTags:(NSArray * _Nullable)caseAuthenticatedTags + error:(NSError * __autoreleasing _Nullable * _Nullable)error { NSLog(@"Generating operational certificate"); @@ -127,7 +127,7 @@ + (BOOL)keypair:(id)keypair matchesCertificate:(NSData *)certificate return certKeySpan.data_equal(keypairKeySpan); } -+ (BOOL)isCertificate:(NSData *)certificate1 equalTo:(NSData *)certificate2 ++ (BOOL)isCertificate:(MTRCertificateDERBytes *)certificate1 equalTo:(MTRCertificateDERBytes *)certificate2 { [MTRMemory ensureInit]; @@ -168,8 +168,8 @@ + (BOOL)isCertificate:(NSData *)certificate1 equalTo:(NSData *)certificate2 return subject1.IsEqual(subject2); } -+ (nullable NSData *)generateCertificateSigningRequest:(id)keypair - error:(NSError * __autoreleasing _Nullable * _Nullable)error ++ (NSData * _Nullable)createCertificateSigningRequest:(id)keypair + error:(NSError * __autoreleasing _Nullable * _Nullable)error { [MTRMemory ensureInit]; @@ -197,7 +197,7 @@ + (nullable NSData *)generateCertificateSigningRequest:(id)keypair return nil; } -+ (nullable NSData *)convertX509Certificate:(NSData *)x509Certificate ++ (MTRCertificateTLVBytes * _Nullable)convertX509Certificate:(MTRCertificateDERBytes *)x509Certificate { chip::ByteSpan x509CertBytes = AsByteSpan(x509Certificate); diff --git a/src/darwin/Framework/CHIP/MTRCluster.h b/src/darwin/Framework/CHIP/MTRCluster.h index 4dc53ecb3e09d8..ad0041d92a8b1e 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.h +++ b/src/darwin/Framework/CHIP/MTRCluster.h @@ -54,8 +54,7 @@ NS_ASSUME_NONNULL_BEGIN * from the sever to the client (for the status response and actual write * request) within the timeout window. * - * This value is specified in milliseconds - * + * This value is specified in milliseconds. */ @property (nonatomic, copy, nullable) NSNumber * timedWriteTimeout; @@ -67,9 +66,6 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, copy, nullable) NSNumber * dataVersion; -- (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; - @end /** @@ -81,8 +77,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRReadParams : NSObject /** - * Whether the read/subscribe is fabric-filtered. nil (the default value) is - * treated as YES. + * Whether the read/subscribe is fabric-filtered. The default is YES. * * If YES, the read/subscribe is fabric-filtered and will only see things * associated with the fabric of the reader/subscriber. @@ -90,10 +85,7 @@ NS_ASSUME_NONNULL_BEGIN * If NO, the read/subscribe is not fabric-filtered and will see all * non-fabric-sensitive data for the given attribute path. */ -@property (nonatomic, copy, nullable) NSNumber * fabricFiltered; - -- (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +@property (nonatomic, assign) BOOL fabricFiltered; @end @@ -107,18 +99,18 @@ NS_ASSUME_NONNULL_BEGIN /** * Whether the subscribe should allow previous subscriptions to stay in - * place. nil (the default value) is treated as NO. + * place. The default value is NO. * * If NO, the subscribe will cancel any existing subscriptions to the target * node when it sets up the new one. * * If YES, the subscribe will allow any previous subscriptions to remain. */ -@property (nonatomic, copy, nullable) NSNumber * keepPreviousSubscriptions; +@property (nonatomic, assign) BOOL keepPreviousSubscriptions; /** * Whether the subscription should automatically try to re-establish if it - * drops. nil (the default value) is treated as YES. + * drops. The default value is YES. * * If NO, loss of subscription will simply lead to an error report. Some * subscription APIs do not support this value. @@ -128,11 +120,31 @@ NS_ASSUME_NONNULL_BEGIN * called again. * */ -@property (nonatomic, copy, nullable) NSNumber * autoResubscribe; +@property (nonatomic, assign) BOOL autoResubscribe; -- (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +/** + * The minimum time, in seconds, between consecutive reports a server will send + * for this subscription. This can be used to rate-limit the subscription + * traffic. Any non-negative value is allowed, including 0. + */ +@property (nonatomic, copy) NSNumber * minInterval; +/** + * The suggested maximum time, in seconds, during which the server is allowed to + * send no reports at all for this subscription. Must be at least as large as + * minInterval. The server is allowed to use a larger time than this as the + * maxInterval it selects if it needs to (e.g. to meet its power budget). + */ +@property (nonatomic, copy) NSNumber * maxInterval; + +/** + * Initialize an MTRSubscribeParams. Must provide a minInterval and + * maxInterval; there are no default values for those. + */ +- (instancetype)initWithMinInterval:(NSNumber *)minInterval maxInterval:(NSNumber *)maxInterval; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRCluster.mm b/src/darwin/Framework/CHIP/MTRCluster.mm index 480b80ade3ce00..21b65d8c696467 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.mm +++ b/src/darwin/Framework/CHIP/MTRCluster.mm @@ -51,7 +51,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRWriteParams alloc] init]; other.timedWriteTimeout = self.timedWriteTimeout; @@ -65,12 +65,12 @@ @implementation MTRReadParams - (instancetype)init { if (self = [super init]) { - _fabricFiltered = nil; + _fabricFiltered = YES; } return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRReadParams alloc] init]; other.fabricFiltered = self.fabricFiltered; @@ -80,18 +80,20 @@ - (id)copyWithZone:(nullable NSZone *)zone @end @implementation MTRSubscribeParams -- (instancetype)init +- (instancetype)initWithMinInterval:(NSNumber *)minInterval maxInterval:(NSNumber *)maxInterval { if (self = [super init]) { - _keepPreviousSubscriptions = nil; - _autoResubscribe = nil; + _keepPreviousSubscriptions = NO; + _autoResubscribe = YES; + _minInterval = [minInterval copy]; + _maxInterval = [maxInterval copy]; } return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRSubscribeParams alloc] init]; + auto other = [[MTRSubscribeParams alloc] initWithMinInterval:self.minInterval maxInterval:self.maxInterval]; other.fabricFiltered = self.fabricFiltered; other.keepPreviousSubscriptions = self.keepPreviousSubscriptions; other.autoResubscribe = self.autoResubscribe; diff --git a/src/darwin/Framework/CHIP/MTRCluster_internal.h b/src/darwin/Framework/CHIP/MTRCluster_internal.h index 615b8eb732b48d..1ea8e80b01237c 100644 --- a/src/darwin/Framework/CHIP/MTRCluster_internal.h +++ b/src/darwin/Framework/CHIP/MTRCluster_internal.h @@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRCluster () @property (readonly, nonatomic) dispatch_queue_t callbackQueue; -- (nullable instancetype)initWithQueue:(dispatch_queue_t)queue; +- (instancetype _Nullable)initWithQueue:(dispatch_queue_t)queue; - (chip::ByteSpan)asByteSpan:(NSData *)value; - (chip::CharSpan)asCharSpan:(NSString *)value; @end diff --git a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h index cbbb2a44a68d4a..5a5eeae69826f1 100644 --- a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h +++ b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h @@ -22,26 +22,34 @@ NS_ASSUME_NONNULL_BEGIN @protocol MTRDeviceAttestationDelegate; /** - * The class definition for the CHIPCommissioningParameters - * + * Information that can be provided to commissionWithNodeID to commision devices. */ @interface MTRCommissioningParameters : NSObject /** - * The CSRNonce + * The nonce to use when requesting a CSR for the node's operational + * certificate. + * + * If nil, a random nonce will be generated automatically. + * + * If not nil, must be 32 bytes of data. */ -@property (nonatomic, copy, nullable) NSData * CSRNonce; +@property (nonatomic, copy, nullable) NSData * csrNonce; /** - * The AttestationNonce + * The nonce to use when requesting attestation information from the device. + * + * If nil, a random nonce will be generated automatically. + * + * If not nil, must be 32 bytes of data. */ @property (nonatomic, copy, nullable) NSData * attestationNonce; /** - * The Wi-Fi SSID, if available. + * The Wi-Fi SSID, if available. */ @property (nonatomic, copy, nullable) NSData * wifiSSID; /** - * The Wi-Fi Credentials. Allowed to be nil or 0-length data for an open - * network, as long as wifiSSID is not nil. + * The Wi-Fi Credentials. Allowed to be nil or 0-length data for an open + * network, as long as wifiSSID is not nil. */ @property (nonatomic, copy, nullable) NSData * wifiCredentials; /** @@ -49,13 +57,20 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, copy, nullable) NSData * threadOperationalDataset; /** - * The Device Attestation status delegate + * An optional delegate that can be notified upon completion of device + * attestation. See documentation for MTRDeviceAttestationDelegate for + * details. */ @property (nonatomic, strong, nullable) id deviceAttestationDelegate; /** - * The timeout in secs to set for fail-safe when attestation fails + * The timeout, in seconds, to set for the fail-safe when calling into the + * deviceAttestationDelegate and waiting for it to respond. + * + * If nil, the fail-safe will not be extended before calling into the + * deviceAttestationDelegate. + */ -@property (nonatomic, copy, nullable) NSNumber * failSafeExpiryTimeoutSecs; +@property (nonatomic, copy, nullable) NSNumber * failSafeExpiryTimeout; @end diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 5260f63a24f589..9a9f0a3fd49e67 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -371,26 +371,26 @@ - (void)subscribeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)max MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:@(self.nodeID) controller:self.deviceController]; - [baseDevice - readAttributeWithEndpointID:endpointID - clusterID:clusterID - attributeID:attributeID - params:params - queue:self.queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - if (values) { - // Since the format is the same data-value dictionary, this looks like an attribute - // report - [self _handleAttributeReport:values]; - } - - // TODO: better retry logic - if (retryCount < 2) { - [workItem retryWork]; - } else { - [workItem endWork]; - } - }]; + [baseDevice readAttributePathWithEndpointID:endpointID + clusterID:clusterID + attributeID:attributeID + params:params + queue:self.queue + completion:^(NSArray *> * _Nullable values, + NSError * _Nullable error) { + if (values) { + // Since the format is the same data-value dictionary, this looks like an attribute + // report + [self _handleAttributeReport:values]; + } + + // TODO: better retry logic + if (retryCount < 2) { + [workItem retryWork]; + } else { + [workItem endWork]; + } + }]; }; workItem.readyHandler = readyHandler; [_asyncCallbackWorkQueue enqueueWorkItem:workItem]; diff --git a/src/darwin/Framework/CHIP/MTRDeviceController+XPC.h b/src/darwin/Framework/CHIP/MTRDeviceController+XPC.h index 868e2c89c1d27d..a1e64bfb1749b2 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController+XPC.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController+XPC.h @@ -68,12 +68,12 @@ typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error) /** * Returns a serialized subscribe parameter object to send over XPC */ -+ (NSDictionary * _Nullable)encodeXPCSubscribeParams:(MTRSubscribeParams *)params; ++ (NSDictionary *)encodeXPCSubscribeParams:(MTRSubscribeParams *)params; /** * Returns a deserialized subscribe parameter object from an object received over XPC */ -+ (MTRSubscribeParams * _Nullable)decodeXPCSubscribeParams:(NSDictionary * _Nullable)params; ++ (MTRSubscribeParams *)decodeXPCSubscribeParams:(NSDictionary *)params; @end /** @@ -134,9 +134,7 @@ typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error) endpointID:(NSNumber * _Nullable)endpointID clusterID:(NSNumber * _Nullable)clusterID attributeID:(NSNumber * _Nullable)attributeID - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - params:(NSDictionary * _Nullable)params + params:(NSDictionary *)params establishedHandler:(dispatch_block_t)establishedHandler; /** @@ -149,9 +147,7 @@ typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error) */ - (void)subscribeWithController:(id _Nullable)controller nodeID:(NSNumber *)nodeID - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - params:(NSDictionary * _Nullable)params + params:(NSDictionary *)params shouldCache:(BOOL)shouldCache completion:(MTRStatusCompletion)completion; diff --git a/src/darwin/Framework/CHIP/MTRDeviceController+XPC.m b/src/darwin/Framework/CHIP/MTRDeviceController+XPC.m index 37370cc29f81a7..ca68d1102d4e71 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController+XPC.m +++ b/src/darwin/Framework/CHIP/MTRDeviceController+XPC.m @@ -26,6 +26,8 @@ static NSString * const kFabricFilteredKey = @"fabricFiltered"; static NSString * const kKeepPreviousSubscriptionsKey = @"keepPreviousSubscriptions"; static NSString * const kAutoResubscribeKey = @"autoResubscribe"; +static NSString * const kMinIntervalKey = @"minInterval"; +static NSString * const kMaxIntervalKey = @"maxInterval"; static NSArray * _Nullable encodeAttributePath(MTRAttributePath * _Nullable path) { @@ -61,7 +63,7 @@ static void decodeReadParams(NSDictionary * inParams, MTRReadParams * outParams) { - outParams.fabricFiltered = inParams[kFabricFilteredKey]; + outParams.fabricFiltered = [inParams[kFabricFilteredKey] boolValue]; } @implementation MTRDeviceController (XPC) @@ -127,9 +129,7 @@ + (MTRDeviceController *)sharedControllerWithID:(id _Nullable)control return nil; } NSMutableDictionary * result = [NSMutableDictionary dictionary]; - if (params.fabricFiltered) { - result[kFabricFilteredKey] = params.fabricFiltered; - } + result[kFabricFilteredKey] = @(params.fabricFiltered); return result; } @@ -143,31 +143,24 @@ + (MTRReadParams * _Nullable)decodeXPCReadParams:(NSDictionary * return result; } -+ (NSDictionary * _Nullable)encodeXPCSubscribeParams:(MTRSubscribeParams *)params ++ (NSDictionary *)encodeXPCSubscribeParams:(MTRSubscribeParams *)params { - if (!params) { - return nil; - } NSMutableDictionary * result = [NSMutableDictionary dictionaryWithDictionary:[MTRDeviceController encodeXPCReadParams:params]]; - if (params.keepPreviousSubscriptions) { - result[kKeepPreviousSubscriptionsKey] = params.keepPreviousSubscriptions; - } - if (params.autoResubscribe) { - result[kAutoResubscribeKey] = params.autoResubscribe; - } + result[kKeepPreviousSubscriptionsKey] = @(params.keepPreviousSubscriptions); + result[kAutoResubscribeKey] = @(params.autoResubscribe); + result[kMinIntervalKey] = params.minInterval; + result[kMaxIntervalKey] = params.maxInterval; return result; } -+ (MTRSubscribeParams * _Nullable)decodeXPCSubscribeParams:(NSDictionary * _Nullable)params ++ (MTRSubscribeParams *)decodeXPCSubscribeParams:(NSDictionary *)params { - if (!params) { - return nil; - } - MTRSubscribeParams * result = [[MTRSubscribeParams alloc] init]; + MTRSubscribeParams * result = [[MTRSubscribeParams alloc] initWithMinInterval:params[kMinIntervalKey] + maxInterval:params[kMaxIntervalKey]]; decodeReadParams(params, result); - result.keepPreviousSubscriptions = params[kKeepPreviousSubscriptionsKey]; - result.autoResubscribe = params[kAutoResubscribeKey]; + result.keepPreviousSubscriptions = [params[kKeepPreviousSubscriptionsKey] boolValue]; + result.autoResubscribe = [params[kAutoResubscribeKey] boolValue]; return result; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.h b/src/darwin/Framework/CHIP/MTRDeviceController.h index 7c0df10a11bb17..c3b49508a1cb87 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController.h @@ -23,14 +23,16 @@ NS_ASSUME_NONNULL_BEGIN -typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NSError * _Nullable error); - @class MTRCommissioningParameters; -@protocol MTRDevicePairingDelegate; +@protocol MTRDeviceControllerDelegate; +@class MTRSetupPayload; @interface MTRDeviceController : NSObject -@property (readonly, nonatomic) BOOL isRunning; +/** + * If true, the controller has not been shut down yet. + */ +@property (readonly, nonatomic, getter=isRunning) BOOL running; /** * Return the Node ID assigned to the controller. Will return nil if the @@ -39,64 +41,63 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS @property (readonly, nonatomic, nullable) NSNumber * controllerNodeID; /** - * Start pairing for a device with the given ID, using the provided setup PIN - * to establish a PASE connection. + * Set up a commissioning session for a device, using the provided setup payload + * to discover it and connect to it. + * + * @param payload a setup payload (probably created from a QR code or numeric + * code onboarding payload). + * @param newNodeID the planned node id for the node. + * @error error indication if discovery can't start at all (e.g. because the + * setup payload is invalid). * * The IP and port for the device will be discovered automatically based on the * provided discriminator. * - * The pairing process will proceed until a PASE session is established or an - * error occurs, then notify onPairingComplete on the MTRDevicePairingDelegate - * for this controller. That delegate is expected to call commissionDevice - * after that point if it wants to commission the device. - */ -- (BOOL)pairDevice:(uint64_t)deviceID - discriminator:(uint16_t)discriminator - setupPINCode:(uint32_t)setupPINCode - error:(NSError * __autoreleasing *)error; - -/** - * Start pairing for a device with the given ID, using the provided IP address - * and port to connect to the device and the provided setup PIN to establish a - * PASE connection. - * - * The pairing process will proceed until a PASE session is established or an - * error occurs, then notify onPairingComplete on the MTRDevicePairingDelegate - * for this controller. That delegate is expected to call commissionDevice - * after that point if it wants to commission the device. + * Then a PASE session will be established with the device, unless an error + * occurs. MTRDevicePairingDelegate will be notified as follows: + * + * * Discovery fails: onStatusUpdate with MTRPairingStatusFailed. + * + * * Discovery succeeds but commissioning session setup fails: onPairingComplete + * with an error. + * + * * Commissioning session setup succeeds: onPairingComplete with no error. + * + * Once a commissioning session is set up, deviceBeingCommissionedWithNodeID + * can be used to get an MTRBaseDevice and discover what sort of network + * credentials the device might need, and commissionNodeWithID can be used to + * commission the device. */ -- (BOOL)pairDevice:(uint64_t)deviceID - address:(NSString *)address - port:(uint16_t)port - setupPINCode:(uint32_t)setupPINCode - error:(NSError * __autoreleasing *)error; +- (BOOL)setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload + newNodeID:(NSNumber *)newNodeID + error:(NSError * __autoreleasing *)error; /** - * Start pairing for a device with the given ID and onboarding payload (QR code - * or manual setup code). The payload will be used to discover the device and - * establish a PASE connection. - * - * The pairing process will proceed until a PASE session is established or an - * error occurs, then notify onPairingComplete on the MTRDevicePairingDelegate - * for this controller. That delegate is expected to call commissionDevice - * after that point if it wants to commission the device. + * Commission the node with the given node ID. The node ID must match the node + * ID that was used to set up the commissioning session. */ -- (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPayload error:(NSError * __autoreleasing *)error; -- (BOOL)commissionDevice:(uint64_t)deviceID - commissioningParams:(MTRCommissioningParameters *)commissioningParams - error:(NSError * __autoreleasing *)error; +- (BOOL)commissionNodeWithID:(NSNumber *)nodeID + commissioningParams:(MTRCommissioningParameters *)commissioningParams + error:(NSError * __autoreleasing *)error; - (BOOL)continueCommissioningDevice:(void *)device ignoreAttestationFailure:(BOOL)ignoreAttestationFailure error:(NSError * __autoreleasing *)error; -- (BOOL)stopDevicePairing:(uint64_t)deviceID error:(NSError * __autoreleasing *)error; +/** + * Cancel commissioning for the given node id. This will shut down any existing + * commissioning session for that node id. + */ +- (BOOL)cancelCommissioningForNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error; -- (nullable MTRBaseDevice *)getDeviceBeingCommissioned:(uint64_t)deviceID error:(NSError * __autoreleasing *)error; -- (BOOL)getBaseDevice:(uint64_t)deviceID queue:(dispatch_queue_t)queue completion:(MTRDeviceConnectionCallback)completion; +/** + * Get an MTRBaseDevice for a commissioning session that was set up for the + * given node ID. Returns nil if no such commissioning session is available. + */ +- (nullable MTRBaseDevice *)deviceBeingCommissionedWithNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error; /** - * Controllers are created via the MTRControllerFactory object. + * Controllers are created via the MTRDeviceControllerFactory object. */ - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -108,7 +109,7 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS * * @param[in] queue The queue on which the callbacks will be delivered */ -- (void)setPairingDelegate:(id)delegate queue:(dispatch_queue_t)queue; +- (void)setDeviceControllerDelegate:(id)delegate queue:(dispatch_queue_t)queue; /** * Sets this MTRDeviceController to use the given issuer for issuing operational certs. By default, the MTRDeviceController uses an @@ -130,22 +131,27 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS * Attempts to retrieve the attestation challenge for a commissionee with the given Device ID. * Returns nil if given Device ID does not match an active commissionee, or if a Secure Session is not availale. */ -- (nullable NSData *)fetchAttestationChallengeForDeviceID:(uint64_t)deviceID; +- (NSData * _Nullable)fetchAttestationChallengeForDeviceID:(NSNumber *)deviceID; /** - * Compute a PASE verifier and passcode ID for the desired setup pincode. + * Compute a PASE verifier for the desired setup passcode. * - * @param[in] setupPincode The desired PIN code to use - * @param[in] iterations The number of iterations to use when generating the verifier - * @param[in] salt The 16-byte salt for verifier computation + * @param[in] setupPasscode The desired passcode to use. + * @param[in] iterations The number of iterations to use when generating the verifier. + * @param[in] salt The 16-byte salt for verifier computation. * * Returns nil on errors (e.g. salt has the wrong size), otherwise the computed * verifier bytes. */ -+ (nullable NSData *)computePaseVerifier:(uint32_t)setupPincode iterations:(uint32_t)iterations salt:(NSData *)salt; ++ (nullable NSData *)computePASEVerifierForSetupPasscode:(NSNumber *)setupPasscode + iterations:(NSNumber *)iterations + salt:(NSData *)salt + error:(NSError * __autoreleasing *)error; /** - * Shutdown the controller. Calls to shutdown after the first one are NO-OPs. + * Shut down the controller. Calls to shutdown after the first one are NO-OPs. + * This must be called, either directly or via shutting down the + * MTRDeviceControllerFactory, to avoid leaking the controller. */ - (void)shutdown; diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 3e48e719508316..e51c7f435d36c9 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -20,10 +20,10 @@ #import "MTRBaseDevice_Internal.h" #import "MTRCommissioningParameters.h" -#import "MTRControllerFactory_Internal.h" +#import "MTRDeviceControllerDelegateBridge.h" +#import "MTRDeviceControllerFactory_Internal.h" #import "MTRDeviceControllerStartupParams.h" #import "MTRDeviceControllerStartupParams_Internal.h" -#import "MTRDevicePairingDelegateBridge.h" #import "MTRDevice_Internal.h" #import "MTRError_Internal.h" #import "MTRKeypair.h" @@ -73,6 +73,8 @@ static NSString * const kErrorCSRValidation = @"Extracting public key from CSR failed"; static NSString * const kErrorGetCommissionee = @"Failure obtaining device being commissioned"; static NSString * const kErrorGetAttestationChallenge = @"Failure getting attestation challenge"; +static NSString * const kErrorSpake2pVerifierGenerationFailed = @"PASE verifier generation failed"; +static NSString * const kErrorSpake2pVerifierSerializationFailed = @"PASE verifier serialization failed"; @interface MTRDeviceController () @@ -81,19 +83,19 @@ @interface MTRDeviceController () @property (readonly) chip::Controller::DeviceCommissioner * cppCommissioner; @property (readonly) chip::Credentials::PartialDACVerifier * partialDACVerifier; -@property (readonly) MTRDevicePairingDelegateBridge * pairingDelegateBridge; +@property (readonly) MTRDeviceControllerDelegateBridge * deviceControllerDelegateBridge; @property (readonly) MTROperationalCredentialsDelegate * operationalCredentialsDelegate; @property (readonly) MTRP256KeypairBridge signingKeypairBridge; @property (readonly) MTRP256KeypairBridge operationalKeypairBridge; @property (readonly) MTRDeviceAttestationDelegateBridge * deviceAttestationDelegateBridge; -@property (readonly) MTRControllerFactory * factory; +@property (readonly) MTRDeviceControllerFactory * factory; @property (readonly) NSMutableDictionary * nodeIDToDeviceMap; @property (readonly) os_unfair_lock deviceMapLock; // protects nodeIDToDeviceMap @end @implementation MTRDeviceController -- (instancetype)initWithFactory:(MTRControllerFactory *)factory queue:(dispatch_queue_t)queue +- (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory queue:(dispatch_queue_t)queue { if (self = [super init]) { _chipWorkQueue = queue; @@ -101,8 +103,8 @@ - (instancetype)initWithFactory:(MTRControllerFactory *)factory queue:(dispatch_ _deviceMapLock = OS_UNFAIR_LOCK_INIT; _nodeIDToDeviceMap = [NSMutableDictionary dictionary]; - _pairingDelegateBridge = new MTRDevicePairingDelegateBridge(); - if ([self checkForInitError:(_pairingDelegateBridge != nullptr) logMsg:kErrorPairingInit]) { + _deviceControllerDelegateBridge = new MTRDeviceControllerDelegateBridge(); + if ([self checkForInitError:(_deviceControllerDelegateBridge != nullptr) logMsg:kErrorPairingInit]) { return nil; } @@ -139,11 +141,10 @@ - (void)shutdown - (void)cleanupAfterStartup { [_factory controllerShuttingDown:self]; - [self cleanup]; } // Part of cleanupAfterStartup that has to interact with the Matter work queue -// in a very specific way that only MTRControllerFactory knows about. +// in a very specific way that only MTRDeviceControllerFactory knows about. - (void)shutDownCppController { if (_cppCommissioner) { @@ -160,6 +161,11 @@ - (void)shutDownCppController } } +- (void)deinitFromFactory +{ + [self cleanup]; +} + // Clean up any members we might have allocated. - (void)cleanup { @@ -177,9 +183,9 @@ - (void)cleanup _partialDACVerifier = nullptr; } - if (_pairingDelegateBridge) { - delete _pairingDelegateBridge; - _pairingDelegateBridge = nullptr; + if (_deviceControllerDelegateBridge) { + delete _deviceControllerDelegateBridge; + _deviceControllerDelegateBridge = nullptr; } } @@ -249,7 +255,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams chip::Controller::SetupParams commissionerParams; - commissionerParams.pairingDelegate = _pairingDelegateBridge; + commissionerParams.pairingDelegate = _deviceControllerDelegateBridge; _operationalCredentialsDelegate->SetDeviceCommissioner(_cppCommissioner); @@ -357,39 +363,9 @@ - (NSNumber *)controllerNodeID return nodeID; } -- (BOOL)pairDevice:(uint64_t)deviceID - discriminator:(uint16_t)discriminator - setupPINCode:(uint32_t)setupPINCode - error:(NSError * __autoreleasing *)error -{ - VerifyOrReturnValue([self checkIsRunning:error], NO); - - __block BOOL success = NO; - dispatch_sync(_chipWorkQueue, ^{ - VerifyOrReturn([self checkIsRunning:error]); - - std::string manualPairingCode; - chip::SetupPayload payload; - payload.discriminator.SetLongValue(discriminator); - payload.setUpPINCode = setupPINCode; - - auto errorCode = chip::ManualSetupPayloadGenerator(payload).payloadDecimalStringRepresentation(manualPairingCode); - success = ![self checkForError:errorCode logMsg:kErrorSetupCodeGen error:error]; - VerifyOrReturn(success); - - _operationalCredentialsDelegate->SetDeviceID(deviceID); - errorCode = self.cppCommissioner->EstablishPASEConnection(deviceID, manualPairingCode.c_str()); - success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; - }); - - return success; -} - -- (BOOL)pairDevice:(uint64_t)deviceID - address:(NSString *)address - port:(uint16_t)port - setupPINCode:(uint32_t)setupPINCode - error:(NSError * __autoreleasing *)error +- (BOOL)setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload + newNodeID:(NSNumber *)newNodeID + error:(NSError * __autoreleasing *)error; { VerifyOrReturnValue([self checkIsRunning:error], NO); @@ -397,38 +373,29 @@ - (BOOL)pairDevice:(uint64_t)deviceID dispatch_sync(_chipWorkQueue, ^{ VerifyOrReturn([self checkIsRunning:error]); - chip::Inet::IPAddress addr; - chip::Inet::IPAddress::FromString([address UTF8String], addr); - chip::Transport::PeerAddress peerAddress = chip::Transport::PeerAddress::UDP(addr, port); - - _operationalCredentialsDelegate->SetDeviceID(deviceID); + // Try to get a QR code if possible (because it has a better + // discriminator, etc), then fall back to manual code if that fails. + NSString * pairingCode = [payload qrCodeString]; + if (pairingCode == nil) { + pairingCode = [payload manualEntryCode]; + } + if (pairingCode == nil) { + success = ![MTRDeviceController checkForError:CHIP_ERROR_INVALID_ARGUMENT logMsg:kErrorSetupCodeGen error:error]; + return; + } - auto params = chip::RendezvousParameters().SetSetupPINCode(setupPINCode).SetPeerAddress(peerAddress); - auto errorCode = self.cppCommissioner->EstablishPASEConnection(deviceID, params); - success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; + chip::NodeId nodeId = [newNodeID unsignedLongLongValue]; + _operationalCredentialsDelegate->SetDeviceID(nodeId); + CHIP_ERROR errorCode = self.cppCommissioner->EstablishPASEConnection(nodeId, [pairingCode UTF8String]); + success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorPairDevice error:error]; }); return success; } -- (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPayload error:(NSError * __autoreleasing *)error -{ - VerifyOrReturnValue([self checkIsRunning:error], NO); - - __block BOOL success = NO; - dispatch_sync(_chipWorkQueue, ^{ - VerifyOrReturn([self checkIsRunning:error]); - - _operationalCredentialsDelegate->SetDeviceID(deviceID); - auto errorCode = self.cppCommissioner->EstablishPASEConnection(deviceID, [onboardingPayload UTF8String]); - success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; - }); - return success; -} - -- (BOOL)commissionDevice:(uint64_t)deviceID - commissioningParams:(MTRCommissioningParameters *)commissioningParams - error:(NSError * __autoreleasing *)error +- (BOOL)commissionNodeWithID:(NSNumber *)nodeID + commissioningParams:(MTRCommissioningParameters *)commissioningParams + error:(NSError * __autoreleasing *)error { VerifyOrReturnValue([self checkIsRunning:error], NO); @@ -437,8 +404,8 @@ - (BOOL)commissionDevice:(uint64_t)deviceID VerifyOrReturn([self checkIsRunning:error]); chip::Controller::CommissioningParameters params; - if (commissioningParams.CSRNonce) { - params.SetCSRNonce(AsByteSpan(commissioningParams.CSRNonce)); + if (commissioningParams.csrNonce) { + params.SetCSRNonce(AsByteSpan(commissioningParams.csrNonce)); } if (commissioningParams.attestationNonce) { params.SetAttestationNonce(AsByteSpan(commissioningParams.attestationNonce)); @@ -459,9 +426,9 @@ - (BOOL)commissionDevice:(uint64_t)deviceID [self clearDeviceAttestationDelegateBridge]; chip::Optional timeoutSecs; - if (commissioningParams.failSafeExpiryTimeoutSecs) { + if (commissioningParams.failSafeExpiryTimeout) { timeoutSecs - = chip::MakeOptional(static_cast([commissioningParams.failSafeExpiryTimeoutSecs unsignedIntValue])); + = chip::MakeOptional(static_cast([commissioningParams.failSafeExpiryTimeout unsignedIntValue])); } BOOL shouldWaitAfterDeviceAttestation = NO; if ([commissioningParams.deviceAttestationDelegate @@ -473,9 +440,10 @@ - (BOOL)commissionDevice:(uint64_t)deviceID params.SetDeviceAttestationDelegate(_deviceAttestationDelegateBridge); } - _operationalCredentialsDelegate->SetDeviceID(deviceID); - auto errorCode = self.cppCommissioner->Commission(deviceID, params); - success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; + chip::NodeId deviceId = [nodeID unsignedLongLongValue]; + _operationalCredentialsDelegate->SetDeviceID(deviceId); + auto errorCode = self.cppCommissioner->Commission(deviceId, params); + success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorPairDevice error:error]; }); return success; } @@ -497,12 +465,12 @@ - (BOOL)continueCommissioningDevice:(void *)device auto deviceProxy = static_cast(device); auto errorCode = self.cppCommissioner->ContinueCommissioningAfterDeviceAttestation(deviceProxy, ignoreAttestationFailure ? chip::Credentials::AttestationVerificationResult::kSuccess : lastAttestationResult); - success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; + success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorPairDevice error:error]; }); return success; } -- (BOOL)stopDevicePairing:(uint64_t)deviceID error:(NSError * __autoreleasing *)error +- (BOOL)cancelCommissioningForNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error { VerifyOrReturnValue([self checkIsRunning:error], NO); @@ -511,14 +479,13 @@ - (BOOL)stopDevicePairing:(uint64_t)deviceID error:(NSError * __autoreleasing *) VerifyOrReturn([self checkIsRunning:error]); _operationalCredentialsDelegate->ResetDeviceID(); - auto errorCode = self.cppCommissioner->StopPairing(deviceID); - success = ![self checkForError:errorCode logMsg:kErrorStopPairing error:error]; + auto errorCode = self.cppCommissioner->StopPairing([nodeID unsignedLongLongValue]); + success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorStopPairing error:error]; }); - return success; } -- (MTRBaseDevice *)getDeviceBeingCommissioned:(uint64_t)deviceID error:(NSError * __autoreleasing *)error +- (MTRBaseDevice *)deviceBeingCommissionedWithNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error { VerifyOrReturnValue([self checkIsRunning:error], nil); @@ -528,42 +495,17 @@ - (MTRBaseDevice *)getDeviceBeingCommissioned:(uint64_t)deviceID error:(NSError dispatch_sync(_chipWorkQueue, ^{ VerifyOrReturn([self checkIsRunning:error]); - auto errorCode = self->_cppCommissioner->GetDeviceBeingCommissioned(deviceID, &deviceProxy); - success = ![self checkForError:errorCode logMsg:kErrorStopPairing error:error]; + auto errorCode = self->_cppCommissioner->GetDeviceBeingCommissioned([nodeID unsignedLongLongValue], &deviceProxy); + success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorStopPairing error:error]; }); VerifyOrReturnValue(success, nil); return [[MTRBaseDevice alloc] initWithPASEDevice:deviceProxy controller:self]; } -- (BOOL)getBaseDevice:(uint64_t)deviceID queue:(dispatch_queue_t)queue completion:(MTRDeviceConnectionCallback)completion +- (MTRBaseDevice *)baseDeviceForNodeID:(NSNumber *)nodeID { - NSError * error; - if (![self checkIsRunning:&error]) { - dispatch_async(queue, ^{ - completion(nil, error); - }); - return NO; - } - - // We know getSessionForNode will return YES here, since we already checked - // that we are running. - return [self getSessionForNode:deviceID - completion:^(chip::Messaging::ExchangeManager * _Nullable exchangeManager, - const chip::Optional & session, NSError * _Nullable error) { - // Create an MTRBaseDevice for the node id involved, now that our - // CASE session is primed. We don't actually care about the session - // information here. - dispatch_async(queue, ^{ - MTRBaseDevice * device; - if (error == nil) { - device = [[MTRBaseDevice alloc] initWithNodeID:@(deviceID) controller:self]; - } else { - device = nil; - } - completion(device, error); - }); - }]; + return [[MTRBaseDevice alloc] initWithNodeID:nodeID controller:self]; } - (MTRDevice *)deviceForNodeID:(NSNumber *)nodeID @@ -591,10 +533,10 @@ - (void)removeDevice:(MTRDevice *)device os_unfair_lock_unlock(&_deviceMapLock); } -- (void)setPairingDelegate:(id)delegate queue:(dispatch_queue_t)queue +- (void)setDeviceControllerDelegate:(id)delegate queue:(dispatch_queue_t)queue { dispatch_async(_chipWorkQueue, ^{ - self->_pairingDelegateBridge->setDelegate(delegate, queue); + self->_deviceControllerDelegateBridge->setDelegate(delegate, queue); }); } @@ -614,27 +556,30 @@ - (void)setNocChainIssuer:(id)nocChainIssuer queue:(dispatch_ }); } -+ (nullable NSData *)computePaseVerifier:(uint32_t)setupPincode iterations:(uint32_t)iterations salt:(NSData *)salt ++ (nullable NSData *)computePASEVerifierForSetupPasscode:(NSNumber *)setupPasscode + iterations:(NSNumber *)iterations + salt:(NSData *)salt + error:(NSError * __autoreleasing *)error { + // Spake2pVerifier::Generate takes the passcode by non-const reference for some reason. + uint32_t unboxedSetupPasscode = [setupPasscode unsignedIntValue]; chip::Spake2pVerifier verifier; - CHIP_ERROR err = verifier.Generate(iterations, AsByteSpan(salt), setupPincode); - if (err != CHIP_NO_ERROR) { - MTR_LOG_ERROR("computePaseVerifier generation failed: %s", chip::ErrorStr(err)); + CHIP_ERROR err = verifier.Generate([iterations unsignedIntValue], AsByteSpan(salt), unboxedSetupPasscode); + if ([MTRDeviceController checkForError:err logMsg:kErrorSpake2pVerifierGenerationFailed error:error]) { return nil; } uint8_t serializedBuffer[chip::Crypto::kSpake2p_VerifierSerialized_Length]; chip::MutableByteSpan serializedBytes(serializedBuffer); err = verifier.Serialize(serializedBytes); - if (err != CHIP_NO_ERROR) { - MTR_LOG_ERROR("computePaseVerifier serialization failed: %s", chip::ErrorStr(err)); + if ([MTRDeviceController checkForError:err logMsg:kErrorSpake2pVerifierSerializationFailed error:error]) { return nil; } return AsData(serializedBytes); } -- (nullable NSData *)fetchAttestationChallengeForDeviceID:(uint64_t)deviceID +- (NSData * _Nullable)fetchAttestationChallengeForDeviceID:(NSNumber *)deviceID { VerifyOrReturnValue([self checkIsRunning], nil); @@ -643,15 +588,15 @@ - (nullable NSData *)fetchAttestationChallengeForDeviceID:(uint64_t)deviceID VerifyOrReturn([self checkIsRunning]); chip::CommissioneeDeviceProxy * deviceProxy; - auto errorCode = self.cppCommissioner->GetDeviceBeingCommissioned(deviceID, &deviceProxy); - auto success = ![self checkForError:errorCode logMsg:kErrorGetCommissionee error:nil]; + auto errorCode = self.cppCommissioner->GetDeviceBeingCommissioned([deviceID unsignedLongLongValue], &deviceProxy); + auto success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorGetCommissionee error:nil]; VerifyOrReturn(success); uint8_t challengeBuffer[chip::Crypto::kAES_CCM128_Key_Length]; chip::ByteSpan challenge(challengeBuffer); errorCode = deviceProxy->GetAttestationChallenge(challenge); - success = ![self checkForError:errorCode logMsg:kErrorGetAttestationChallenge error:nil]; + success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorGetAttestationChallenge error:nil]; VerifyOrReturn(success); attestationChallenge = AsData(challenge); @@ -692,7 +637,7 @@ - (BOOL)checkForStartError:(CHIP_ERROR)errorCode logMsg:(NSString *)logMsg return YES; } -- (BOOL)checkForError:(CHIP_ERROR)errorCode logMsg:(NSString *)logMsg error:(NSError * __autoreleasing *)error ++ (BOOL)checkForError:(CHIP_ERROR)errorCode logMsg:(NSString *)logMsg error:(NSError * __autoreleasing *)error { if (CHIP_NO_ERROR == errorCode) { return NO; diff --git a/src/darwin/Framework/CHIP/MTRDevicePairingDelegate.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h similarity index 66% rename from src/darwin/Framework/CHIP/MTRDevicePairingDelegate.h rename to src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h index b4bd25652ae80b..9fcacd903e216e 100644 --- a/src/darwin/Framework/CHIP/MTRDevicePairingDelegate.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h @@ -19,43 +19,43 @@ NS_ASSUME_NONNULL_BEGIN -typedef NS_ENUM(NSUInteger, MTRPairingStatus) { - MTRPairingStatusUnknown = 0, - MTRPairingStatusSuccess = 1, - MTRPairingStatusFailed = 2, - MTRPairingStatusDiscoveringMoreDevices = 3 +typedef NS_ENUM(NSUInteger, MTRCommissioningStatus) { + MTRCommissioningStatusUnknown = 0, + MTRCommissioningStatusSuccess = 1, + MTRCommissioningStatusFailed = 2, + MTRCommissioningStatusDiscoveringMoreDevices = 3 }; /** - * The protocol definition for the MTRDevicePairingDelegate + * The protocol definition for the MTRDeviceControllerDelegate * * All delegate methods will be called on the supplied Delegate Queue. */ -@protocol MTRDevicePairingDelegate +@protocol MTRDeviceControllerDelegate @optional /** * Notify the delegate when pairing status gets updated * */ -- (void)onStatusUpdate:(MTRPairingStatus)status; +- (void)onStatusUpdate:(MTRCommissioningStatus)status; /** * Notify the delegate when pairing is completed * */ -- (void)onPairingComplete:(nullable NSError *)error; +- (void)onPairingComplete:(NSError * _Nullable)error; /** * Notify the delegate when commissioning is completed * */ -- (void)onCommissioningComplete:(nullable NSError *)error; +- (void)onCommissioningComplete:(NSError * _Nullable)error; /** * Notify the delegate when pairing is deleted * */ -- (void)onPairingDeleted:(nullable NSError *)error; +- (void)onPairingDeleted:(NSError * _Nullable)error; @end diff --git a/src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.h similarity index 71% rename from src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.h rename to src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.h index a932319aaf4352..299e85b6a3b5ae 100644 --- a/src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.h @@ -15,20 +15,20 @@ * limitations under the License. */ -#import "MTRDevicePairingDelegate.h" +#import "MTRDeviceControllerDelegate.h" #include #include NS_ASSUME_NONNULL_BEGIN -class MTRDevicePairingDelegateBridge : public chip::Controller::DevicePairingDelegate +class MTRDeviceControllerDelegateBridge : public chip::Controller::DevicePairingDelegate { public: - MTRDevicePairingDelegateBridge(); - ~MTRDevicePairingDelegateBridge(); + MTRDeviceControllerDelegateBridge(); + ~MTRDeviceControllerDelegateBridge(); - void setDelegate(id delegate, dispatch_queue_t queue); + void setDelegate(id delegate, dispatch_queue_t queue); void OnStatusUpdate(chip::Controller::DevicePairingDelegate::Status status) override; @@ -39,10 +39,10 @@ class MTRDevicePairingDelegateBridge : public chip::Controller::DevicePairingDel void OnCommissioningComplete(chip::NodeId deviceId, CHIP_ERROR error) override; private: - _Nullable id mDelegate; + _Nullable id mDelegate; _Nullable dispatch_queue_t mQueue; - MTRPairingStatus MapStatus(chip::Controller::DevicePairingDelegate::Status status); + MTRCommissioningStatus MapStatus(chip::Controller::DevicePairingDelegate::Status status); }; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm similarity index 57% rename from src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.mm rename to src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm index f0393f562d8262..7ef07f87ce860c 100644 --- a/src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm @@ -15,17 +15,17 @@ * limitations under the License. */ -#import "MTRDevicePairingDelegateBridge.h" +#import "MTRDeviceControllerDelegateBridge.h" #import "MTRError_Internal.h" -MTRDevicePairingDelegateBridge::MTRDevicePairingDelegateBridge(void) +MTRDeviceControllerDelegateBridge::MTRDeviceControllerDelegateBridge(void) : mDelegate(nil) { } -MTRDevicePairingDelegateBridge::~MTRDevicePairingDelegateBridge(void) {} +MTRDeviceControllerDelegateBridge::~MTRDeviceControllerDelegateBridge(void) {} -void MTRDevicePairingDelegateBridge::setDelegate(id delegate, dispatch_queue_t queue) +void MTRDeviceControllerDelegateBridge::setDelegate(id delegate, dispatch_queue_t queue) { if (delegate && queue) { mDelegate = delegate; @@ -36,43 +36,43 @@ } } -MTRPairingStatus MTRDevicePairingDelegateBridge::MapStatus(chip::Controller::DevicePairingDelegate::Status status) +MTRCommissioningStatus MTRDeviceControllerDelegateBridge::MapStatus(chip::Controller::DevicePairingDelegate::Status status) { - MTRPairingStatus rv = MTRPairingStatusUnknown; + MTRCommissioningStatus rv = MTRCommissioningStatusUnknown; switch (status) { case chip::Controller::DevicePairingDelegate::Status::SecurePairingSuccess: - rv = MTRPairingStatusSuccess; + rv = MTRCommissioningStatusSuccess; break; case chip::Controller::DevicePairingDelegate::Status::SecurePairingFailed: - rv = MTRPairingStatusFailed; + rv = MTRCommissioningStatusFailed; break; case chip::Controller::DevicePairingDelegate::Status::SecurePairingDiscoveringMoreDevices: - rv = MTRPairingStatusDiscoveringMoreDevices; + rv = MTRCommissioningStatusDiscoveringMoreDevices; break; } return rv; } -void MTRDevicePairingDelegateBridge::OnStatusUpdate(chip::Controller::DevicePairingDelegate::Status status) +void MTRDeviceControllerDelegateBridge::OnStatusUpdate(chip::Controller::DevicePairingDelegate::Status status) { - NSLog(@"DevicePairingDelegate status updated: %d", status); + NSLog(@"DeviceControllerDelegate status updated: %d", status); - id strongDelegate = mDelegate; + id strongDelegate = mDelegate; if ([strongDelegate respondsToSelector:@selector(onStatusUpdate:)]) { if (strongDelegate && mQueue) { - MTRPairingStatus pairingStatus = MapStatus(status); + MTRCommissioningStatus commissioningStatus = MapStatus(status); dispatch_async(mQueue, ^{ - [strongDelegate onStatusUpdate:pairingStatus]; + [strongDelegate onStatusUpdate:commissioningStatus]; }); } } } -void MTRDevicePairingDelegateBridge::OnPairingComplete(CHIP_ERROR error) +void MTRDeviceControllerDelegateBridge::OnPairingComplete(CHIP_ERROR error) { - NSLog(@"DevicePairingDelegate Pairing complete. Status %s", chip::ErrorStr(error)); + NSLog(@"DeviceControllerDelegate Pairing complete. Status %s", chip::ErrorStr(error)); - id strongDelegate = mDelegate; + id strongDelegate = mDelegate; if ([strongDelegate respondsToSelector:@selector(onPairingComplete:)]) { if (strongDelegate && mQueue) { dispatch_async(mQueue, ^{ @@ -83,11 +83,11 @@ } } -void MTRDevicePairingDelegateBridge::OnPairingDeleted(CHIP_ERROR error) +void MTRDeviceControllerDelegateBridge::OnPairingDeleted(CHIP_ERROR error) { - NSLog(@"DevicePairingDelegate Pairing deleted. Status %s", chip::ErrorStr(error)); + NSLog(@"DeviceControllerDelegate Pairing deleted. Status %s", chip::ErrorStr(error)); - id strongDelegate = mDelegate; + id strongDelegate = mDelegate; if ([strongDelegate respondsToSelector:@selector(onPairingDeleted:)]) { if (strongDelegate && mQueue) { dispatch_async(mQueue, ^{ @@ -98,11 +98,11 @@ } } -void MTRDevicePairingDelegateBridge::OnCommissioningComplete(chip::NodeId nodeId, CHIP_ERROR error) +void MTRDeviceControllerDelegateBridge::OnCommissioningComplete(chip::NodeId nodeId, CHIP_ERROR error) { - NSLog(@"DevicePairingDelegate Commissioning complete. NodeId %llu Status %s", nodeId, chip::ErrorStr(error)); + NSLog(@"DeviceControllerDelegate Commissioning complete. NodeId %llu Status %s", nodeId, chip::ErrorStr(error)); - id strongDelegate = mDelegate; + id strongDelegate = mDelegate; if ([strongDelegate respondsToSelector:@selector(onCommissioningComplete:)]) { if (strongDelegate && mQueue) { dispatch_async(mQueue, ^{ diff --git a/src/darwin/Framework/CHIP/MTRControllerFactory.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h similarity index 63% rename from src/darwin/Framework/CHIP/MTRControllerFactory.h rename to src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h index 508cf369374bae..b8131e2e6fe09c 100644 --- a/src/darwin/Framework/CHIP/MTRControllerFactory.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h @@ -24,20 +24,20 @@ NS_ASSUME_NONNULL_BEGIN -@protocol MTRPersistentStorageDelegate; +@protocol MTRStorage; @protocol MTROTAProviderDelegate; @protocol MTRKeypair; @class MTRDeviceController; @class MTRDeviceControllerStartupParams; -@interface MTRControllerFactoryParams : NSObject +@interface MTRDeviceControllerFactoryParams : NSObject /* * Storage delegate must be provided for correct functioning of Matter * controllers. It is used to store persistent information for the fabrics the * controllers ends up interacting with. */ -@property (nonatomic, strong, readonly) id storageDelegate; +@property (nonatomic, strong, readonly) id storage; /* * OTA Provider delegate to be called when an OTA Requestor is requesting a software update. @@ -66,44 +66,47 @@ NS_ASSUME_NONNULL_BEGIN * Whether to run a server capable of accepting incoming CASE * connections. Defaults to NO. */ -@property (nonatomic, assign) BOOL startServer; +@property (nonatomic, assign) BOOL shouldStartServer; - (instancetype)init NS_UNAVAILABLE; -- (instancetype)initWithStorage:(id)storageDelegate; +- (instancetype)initWithStorage:(id)storage; @end -@interface MTRControllerFactory : NSObject +@interface MTRDeviceControllerFactory : NSObject -@property (readonly, nonatomic) BOOL isRunning; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; +/** + * If true, the factory is in a state where it can create controllers: + * startControllerFactory has been called, but stopControllerFactory has not been called + * since then. + */ +@property (readonly, nonatomic, getter=isRunning) BOOL running; /** - * Return the single MTRControllerFactory we support existing. It starts off + * Return the single MTRDeviceControllerFactory we support existing. It starts off * in a "not started" state. */ + (instancetype)sharedInstance; /** - * Start the controller factory. Repeated calls to startup without calls to - * shutdown in between are NO-OPs. Use the isRunning property to check whether - * the controller factory needs to be started up. + * Start the controller factory. Repeated calls to startControllerFactory + * without calls to stopControllerFactory in between are NO-OPs. Use the + * isRunning property to check whether the controller factory needs to be + * started up. * * @param[in] startupParams data needed to start up the controller factory. * * @return Whether startup succeded. */ -- (BOOL)startup:(MTRControllerFactoryParams *)startupParams; +- (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams error:(NSError * __autoreleasing *)error; /** - * Shut down the controller factory. This will shut down any outstanding - * controllers as part of the factory shutdown. + * Stop the controller factory. This will shut down any outstanding + * controllers as part of the factory stopping. * - * Repeated calls to shutdown without calls to startup in between are - * NO-OPs. + * Repeated calls to stopControllerFactory without calls to + * startControllerFactory in between are NO-OPs. */ -- (void)shutdown; +- (void)stopControllerFactory; /** * Create a MTRDeviceController on an existing fabric. Returns nil on failure. @@ -114,7 +117,8 @@ NS_ASSUME_NONNULL_BEGIN * The fabric is identified by the root public key and fabric id in * the startupParams. */ -- (MTRDeviceController * _Nullable)startControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams; +- (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams + error:(NSError * __autoreleasing *)error; /** * Create a MTRDeviceController on a new fabric. Returns nil on failure. @@ -124,7 +128,11 @@ NS_ASSUME_NONNULL_BEGIN * The fabric is identified by the root public key and fabric id in * the startupParams. */ -- (MTRDeviceController * _Nullable)startControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams; +- (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams + error:(NSError * __autoreleasing *)error; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; @end diff --git a/src/darwin/Framework/CHIP/MTRControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm similarity index 84% rename from src/darwin/Framework/CHIP/MTRControllerFactory.mm rename to src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index d44a6202386e6b..7ee9fb783b4a38 100644 --- a/src/darwin/Framework/CHIP/MTRControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -14,8 +14,8 @@ * limitations under the License. */ -#import "MTRControllerFactory.h" -#import "MTRControllerFactory_Internal.h" +#import "MTRDeviceControllerFactory.h" +#import "MTRDeviceControllerFactory_Internal.h" #import "MTRAttestationTrustStoreBridge.h" #import "MTRCertificates.h" @@ -24,6 +24,7 @@ #import "MTRDeviceControllerStartupParams.h" #import "MTRDeviceControllerStartupParams_Internal.h" #import "MTRDeviceController_Internal.h" +#import "MTRError_Internal.h" #import "MTRLogging.h" #import "MTRMemory.h" #import "MTROTAProviderDelegateBridge.h" @@ -57,7 +58,7 @@ static NSString * const kErrorCDCertStoreInit = @"Init failure while initializing Certificate Declaration Signing Keys store"; static NSString * const kErrorOtaProviderInit = @"Init failure while creating an OTA provider delegate"; -@interface MTRControllerFactory () +@interface MTRDeviceControllerFactory () @property (atomic, readonly) dispatch_queue_t chipWorkQueue; @property (readonly) DeviceControllerFactory * controllerFactory; @@ -81,15 +82,15 @@ - (BOOL)findMatchingFabric:(FabricTable &)fabricTable - (MTRDeviceController * _Nullable)maybeInitializeOTAProvider:(MTRDeviceController * _Nonnull)controller; @end -@implementation MTRControllerFactory +@implementation MTRDeviceControllerFactory + (instancetype)sharedInstance { - static MTRControllerFactory * factory = nil; + static MTRDeviceControllerFactory * factory = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ // initialize the factory. - factory = [[MTRControllerFactory alloc] init]; + factory = [[MTRDeviceControllerFactory alloc] init]; }); return factory; } @@ -100,7 +101,7 @@ - (instancetype)init return nil; } - _isRunning = NO; + _running = NO; _chipWorkQueue = DeviceLayer::PlatformMgrImpl().GetWorkQueue(); _controllerFactory = &DeviceControllerFactory::GetInstance(); [MTRMemory ensureInit]; @@ -132,10 +133,23 @@ - (instancetype)init - (void)dealloc { - [self shutdown]; + [self stopControllerFactory]; [self cleanupInitObjects]; } +- (BOOL)checkIsRunning:(NSError * __autoreleasing *)error +{ + if ([self isRunning]) { + return YES; + } + + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + + return NO; +} + - (BOOL)checkForInitError:(BOOL)condition logMsg:(NSString *)logMsg { if (condition) { @@ -200,7 +214,7 @@ - (void)cleanupStartupObjects } } -- (BOOL)startup:(MTRControllerFactoryParams *)startupParams +- (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams error:(NSError * __autoreleasing *)error; { if ([self isRunning]) { MTR_LOG_DEBUG("Ignoring duplicate call to startup, Matter controller factory already started..."); @@ -209,6 +223,7 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams DeviceLayer::PlatformMgrImpl().StartEventLoopTask(); + __block CHIP_ERROR errorCode = CHIP_NO_ERROR; dispatch_sync(_chipWorkQueue, ^{ if ([self isRunning]) { return; @@ -216,9 +231,10 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams [MTRControllerAccessControl init]; - _persistentStorageDelegateBridge = new MTRPersistentStorageDelegateBridge(startupParams.storageDelegate); + _persistentStorageDelegateBridge = new MTRPersistentStorageDelegateBridge(startupParams.storage); if (_persistentStorageDelegateBridge == nil) { MTR_LOG_ERROR("Error: %@", kErrorPersistentStorageInit); + errorCode = CHIP_ERROR_NO_MEMORY; return; } @@ -226,6 +242,7 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams _otaProviderDelegateBridge = new MTROTAProviderDelegateBridge(startupParams.otaProviderDelegate); if (_otaProviderDelegateBridge == nil) { MTR_LOG_ERROR("Error: %@", kErrorOtaProviderInit); + errorCode = CHIP_ERROR_NO_MEMORY; return; } } @@ -234,10 +251,11 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams _keystore = new PersistentStorageOperationalKeystore(); if (_keystore == nullptr) { MTR_LOG_ERROR("Error: %@", kErrorKeystoreInit); + errorCode = CHIP_ERROR_NO_MEMORY; return; } - CHIP_ERROR errorCode = _keystore->Init(_persistentStorageDelegateBridge); + errorCode = _keystore->Init(_persistentStorageDelegateBridge); if (errorCode != CHIP_NO_ERROR) { MTR_LOG_ERROR("Error: %@", kErrorKeystoreInit); return; @@ -247,6 +265,7 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams _opCertStore = new Credentials::PersistentStorageOpCertStore(); if (_opCertStore == nullptr) { MTR_LOG_ERROR("Error: %@", kErrorCertStoreInit); + errorCode = CHIP_ERROR_NO_MEMORY; return; } @@ -262,6 +281,7 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams _attestationTrustStoreBridge = new MTRAttestationTrustStoreBridge(startupParams.paaCerts); if (_attestationTrustStoreBridge == nullptr) { MTR_LOG_ERROR("Error: %@", kErrorAttestationTrustStoreInit); + errorCode = CHIP_ERROR_NO_MEMORY; return; } trustStore = _attestationTrustStoreBridge; @@ -272,6 +292,7 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams _deviceAttestationVerifier = new Credentials::DefaultDACVerifier(trustStore); if (_deviceAttestationVerifier == nullptr) { MTR_LOG_ERROR("Error: %@", kErrorDACVerifierInit); + errorCode = CHIP_ERROR_NO_MEMORY; return; } @@ -279,6 +300,7 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams auto cdTrustStore = _deviceAttestationVerifier->GetCertificationDeclarationTrustStore(); if (cdTrustStore == nullptr) { MTR_LOG_ERROR("Error: %@", kErrorCDCertStoreInit); + errorCode = CHIP_ERROR_INCORRECT_STATE; return; } @@ -295,7 +317,7 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams if (startupParams.port != nil) { params.listenPort = [startupParams.port unsignedShortValue]; } - if (startupParams.startServer == YES) { + if (startupParams.shouldStartServer == YES) { params.enableServerInteractions = true; } @@ -309,7 +331,7 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams return; } - self->_isRunning = YES; + self->_running = YES; }); // Make sure to stop the event loop again before returning, so we are not running it while we don't have any controllers. @@ -317,12 +339,15 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams if (![self isRunning]) { [self cleanupStartupObjects]; + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:errorCode]; + } } return [self isRunning]; } -- (void)shutdown +- (void)stopControllerFactory { if (![self isRunning]) { return; @@ -341,12 +366,13 @@ - (void)shutdown // that does not re-create the objects that we create inside init. // Maybe we should be creating them in startup? - _isRunning = NO; + _running = NO; } -- (MTRDeviceController * _Nullable)startControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams +- (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams + error:(NSError * __autoreleasing *)error { - if (![self isRunning]) { + if (![self checkIsRunning:error]) { MTR_LOG_ERROR("Trying to start controller while Matter controller factory is not running"); return nil; } @@ -355,10 +381,14 @@ - (MTRDeviceController * _Nullable)startControllerOnExistingFabric:(MTRDeviceCon // our fabric table operations there. auto * controller = [self createController]; if (controller == nil) { + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_NO_MEMORY]; + } return nil; } __block MTRDeviceControllerStartupParamsInternal * params = nil; + __block CHIP_ERROR fabricError = CHIP_NO_ERROR; // We want the block to end up with just a pointer to the fabric table, // since we know our on-stack instance will outlive the block. FabricTable fabricTableInstance; @@ -368,11 +398,13 @@ - (MTRDeviceController * _Nullable)startControllerOnExistingFabric:(MTRDeviceCon BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; if (!ok) { MTR_LOG_ERROR("Can't start on existing fabric: fabric matching failed"); + fabricError = CHIP_ERROR_INTERNAL; return; } if (fabric == nullptr) { MTR_LOG_ERROR("Can't start on existing fabric: fabric not found"); + fabricError = CHIP_ERROR_NOT_FOUND; return; } @@ -381,11 +413,13 @@ - (MTRDeviceController * _Nullable)startControllerOnExistingFabric:(MTRDeviceCon if ([existing isRunningOnFabric:fabricTable fabricIndex:fabric->GetFabricIndex() isRunning:&isRunning] != CHIP_NO_ERROR) { MTR_LOG_ERROR("Can't tell what fabric a controller is running on. Not safe to start."); + fabricError = CHIP_ERROR_INTERNAL; return; } if (isRunning) { MTR_LOG_ERROR("Can't start on existing fabric: another controller is running on it"); + fabricError = CHIP_ERROR_INCORRECT_STATE; return; } } @@ -394,22 +428,39 @@ - (MTRDeviceController * _Nullable)startControllerOnExistingFabric:(MTRDeviceCon fabricIndex:fabric->GetFabricIndex() keystore:_keystore params:startupParams]; + if (params == nil) { + fabricError = CHIP_ERROR_NO_MEMORY; + } }); if (params == nil) { [self controllerShuttingDown:controller]; + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:fabricError]; + } return nil; } BOOL ok = [controller startup:params]; if (ok == NO) { + // TODO: get error from controller's startup. + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]; + } return nil; } - return [self maybeInitializeOTAProvider:controller]; + controller = [self maybeInitializeOTAProvider:controller]; + if (controller == nil) { + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]; + } + } + return controller; } -- (MTRDeviceController * _Nullable)startControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams +- (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams + error:(NSError * __autoreleasing *)error { if (![self isRunning]) { MTR_LOG_ERROR("Trying to start controller while Matter controller factory is not running"); @@ -430,10 +481,14 @@ - (MTRDeviceController * _Nullable)startControllerOnNewFabric:(MTRDeviceControll // our fabric table operations there. auto * controller = [self createController]; if (controller == nil) { + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_NO_MEMORY]; + } return nil; } __block MTRDeviceControllerStartupParamsInternal * params = nil; + __block CHIP_ERROR fabricError = CHIP_NO_ERROR; // We want the block to end up with just a pointer to the fabric table, // since we know our on-stack instance will outlive the block. FabricTable fabricTableInstance; @@ -443,30 +498,49 @@ - (MTRDeviceController * _Nullable)startControllerOnNewFabric:(MTRDeviceControll BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; if (!ok) { MTR_LOG_ERROR("Can't start on new fabric: fabric matching failed"); + fabricError = CHIP_ERROR_INTERNAL; return; } if (fabric != nullptr) { MTR_LOG_ERROR("Can't start on new fabric that matches existing fabric"); + fabricError = CHIP_ERROR_INCORRECT_STATE; return; } params = [[MTRDeviceControllerStartupParamsInternal alloc] initForNewFabric:fabricTable keystore:_keystore params:startupParams]; + if (params == nil) { + fabricError = CHIP_ERROR_NO_MEMORY; + } }); if (params == nil) { [self controllerShuttingDown:controller]; + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:fabricError]; + } return nil; } BOOL ok = [controller startup:params]; if (ok == NO) { + // TODO: get error from controller's startup. + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]; + } return nil; } - return [self maybeInitializeOTAProvider:controller]; + // TODO: Need better error propagation. + controller = [self maybeInitializeOTAProvider:controller]; + if (controller == nil) { + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]; + } + } + return controller; } - (MTRDeviceController * _Nullable)createController @@ -553,7 +627,7 @@ - (MTRDeviceController * _Nullable)maybeInitializeOTAProvider:(MTRDeviceControll @end -@implementation MTRControllerFactory (InternalMethods) +@implementation MTRDeviceControllerFactory (InternalMethods) - (void)controllerShuttingDown:(MTRDeviceController *)controller { @@ -593,6 +667,8 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller [controller shutDownCppController]; }); } + + [controller deinitFromFactory]; } - (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex @@ -618,20 +694,20 @@ - (MTRPersistentStorageDelegateBridge *)storageDelegateBridge @end -@implementation MTRControllerFactoryParams +@implementation MTRDeviceControllerFactoryParams -- (instancetype)initWithStorage:(id)storageDelegate +- (instancetype)initWithStorage:(id)storage { if (!(self = [super init])) { return nil; } - _storageDelegate = storageDelegate; + _storage = storage; _otaProviderDelegate = nil; _paaCerts = nil; _cdCerts = nil; _port = nil; - _startServer = NO; + _shouldStartServer = NO; return self; } diff --git a/src/darwin/Framework/CHIP/MTRControllerFactory_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h similarity index 89% rename from src/darwin/Framework/CHIP/MTRControllerFactory_Internal.h rename to src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h index e976aea01609af..a92d00b1c1e8b3 100644 --- a/src/darwin/Framework/CHIP/MTRControllerFactory_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h @@ -15,13 +15,13 @@ */ /** - * Parts of MTRControllerFactory that are not part of the framework API. + * Parts of MTRDeviceControllerFactory that are not part of the framework API. * Mostly for use from MTRDeviceController. */ #import -#import "MTRControllerFactory.h" +#import "MTRDeviceControllerFactory.h" #include @@ -38,7 +38,7 @@ namespace Credentials { NS_ASSUME_NONNULL_BEGIN -@interface MTRControllerFactory (InternalMethods) +@interface MTRDeviceControllerFactory (InternalMethods) - (void)controllerShuttingDown:(MTRDeviceController *)controller; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m index f782c3210aa12e..52cfb2244caba1 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m @@ -46,65 +46,54 @@ + (MTRDeviceControllerOverXPC *)sharedControllerWithID:(id _Nullable) connectBlock:xpcConnectBlock]; } -- (BOOL)pairDevice:(uint64_t)deviceID - discriminator:(uint16_t)discriminator - setupPINCode:(uint32_t)setupPINCode - error:(NSError * __autoreleasing *)error +- (BOOL)setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload + newNodeID:(NSNumber *)newNodeID + error:(NSError * __autoreleasing *)error { - MTR_LOG_ERROR("MTRDevice doesn't support pairDevice over XPC"); + MTR_LOG_ERROR("MTRDeviceController doesn't support setupCommissioningSessionWithPayload over XPC"); + if (error != nil) { + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeInvalidState userInfo:nil]; + } return NO; } -- (BOOL)pairDevice:(uint64_t)deviceID - address:(NSString *)address - port:(uint16_t)port - discriminator:(uint16_t)discriminator - setupPINCode:(uint32_t)setupPINCode - error:(NSError * __autoreleasing *)error +- (BOOL)commissionNodeWithID:(NSNumber *)nodeID + commissioningParams:(MTRCommissioningParameters *)commissioningParams + error:(NSError * __autoreleasing *)error; { - MTR_LOG_ERROR("MTRDevice doesn't support pairDevice over XPC"); + MTR_LOG_ERROR("MTRDeviceController doesn't support commissionNodeWithID over XPC"); + if (error != nil) { + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeInvalidState userInfo:nil]; + } return NO; } -- (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPayload error:(NSError * __autoreleasing *)error +- (BOOL)cancelCommissioningForNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error { - MTR_LOG_ERROR("MTRDevice doesn't support pairDevice over XPC"); + MTR_LOG_ERROR("MTRDeviceController doesn't support cancelCommissioningForNodeID over XPC"); + if (error != nil) { + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeInvalidState userInfo:nil]; + } return NO; } -- (BOOL)commissionDevice:(uint64_t)deviceID - commissioningParams:(MTRCommissioningParameters *)commissioningParams - error:(NSError * __autoreleasing *)error +- (nullable MTRBaseDevice *)deviceBeingCommissionedWithNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error { - MTR_LOG_ERROR("MTRDevice doesn't support pairDevice over XPC"); - return NO; -} - -- (void)setListenPort:(uint16_t)port -{ - MTR_LOG_ERROR("MTRDevice doesn't support setListenPort over XPC"); -} - -- (BOOL)stopDevicePairing:(uint64_t)deviceID error:(NSError * __autoreleasing *)error -{ - MTR_LOG_ERROR("MTRDevice doesn't support stopDevicePairing over XPC"); - return NO; -} - -- (nullable MTRBaseDevice *)getDeviceBeingCommissioned:(uint64_t)deviceID error:(NSError * __autoreleasing *)error -{ - MTR_LOG_ERROR("MTRDevice doesn't support getDeviceBeingCommissioned over XPC"); + MTR_LOG_ERROR("MTRDeviceController doesn't support deviceBeingCommissionedWithNodeID over XPC"); + if (error != nil) { + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeInvalidState userInfo:nil]; + } return nil; } -- (BOOL)getBaseDevice:(uint64_t)deviceID queue:(dispatch_queue_t)queue completion:(MTRDeviceConnectionCallback)completion +- (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchControllerIDCompletion)completion { dispatch_async(_workQueue, ^{ dispatch_group_t group = dispatch_group_create(); if (!self.controllerID) { dispatch_group_enter(group); [self.xpcConnection getProxyHandleWithCompletion:^( - dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { if (handle) { [handle.proxy getAnyDeviceControllerWithCompletion:^(id _Nullable controller, NSError * _Nullable error) { if (error) { @@ -124,16 +113,17 @@ - (BOOL)getBaseDevice:(uint64_t)deviceID queue:(dispatch_queue_t)queue completio } dispatch_group_notify(group, queue, ^{ if (self.controllerID) { - MTRDeviceOverXPC * device = [[MTRDeviceOverXPC alloc] initWithController:self.controllerID - deviceID:@(deviceID) - xpcConnection:self.xpcConnection]; - completion(device, nil); + completion(self.controllerID, nil); } else { completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); } }); }); - return YES; +} + +- (MTRBaseDevice *)baseDeviceForNodeID:(NSNumber *)nodeID +{ + return [[MTRDeviceOverXPC alloc] initWithControllerOverXPC:self deviceID:nodeID xpcConnection:self.xpcConnection]; } - (instancetype)initWithControllerID:(id)controllerID diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h index 43d236e10b975e..d772dab879f077 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h @@ -20,12 +20,17 @@ NS_ASSUME_NONNULL_BEGIN +typedef void (^MTRFetchControllerIDCompletion)(id _Nullable controllerID, NSError * _Nullable error); + @interface MTRDeviceControllerOverXPC () @property (nonatomic, readwrite, strong) id _Nullable controllerID; @property (nonatomic, readonly, strong) dispatch_queue_t workQueue; @property (nonatomic, readonly, strong) MTRDeviceControllerXPCConnection * xpcConnection; +// Guarantees that completion is called with either a non-nil controllerID or a +// non-nil error. +- (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchControllerIDCompletion)completion; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h index c8b36fb830305e..5fd662143a5749 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h @@ -16,6 +16,8 @@ #import +typedef NSData MTRCertificateDERBytes; + NS_ASSUME_NONNULL_BEGIN @protocol MTRKeypair; @@ -26,9 +28,10 @@ NS_ASSUME_NONNULL_BEGIN * if not using an intermediate CA, the intermediate CA's keypair otherwise. * * Allowed to be nil if this controller will not be issuing operational - * certificates. In that case, the MTRDeviceControllerStartupParams object - * must be initialized using initWithOperationalKeypair (to provide the - * operational credentials for the controller itself). + * certificates. In that case, the MTRDeviceControllerStartupParams object must + * be initialized using + * initWithIPK:operationalKeypair:operationalCertificate:intermediateCertificate:rootCertificate: + * (to provide the operational credentials for the controller itself). */ @property (nonatomic, copy, readonly, nullable) id nocSigner; /** @@ -97,8 +100,6 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, copy, nullable) NSNumber * nodeID; -// TODO: Add something here for CATs? - /** * Root certificate, in X.509 DER form, to use. * @@ -130,7 +131,7 @@ NS_ASSUME_NONNULL_BEGIN * 2) The subject DN must match the subject DN of the existing root * certificate. */ -@property (nonatomic, copy, nullable) NSData * rootCertificate; +@property (nonatomic, copy, nullable) MTRCertificateDERBytes * rootCertificate; /** * Intermediate certificate, in X.509 DER form, to use. @@ -162,7 +163,7 @@ NS_ASSUME_NONNULL_BEGIN * allows switching from using an intermediate CA to not using one. * */ -@property (nonatomic, copy, nullable) NSData * intermediateCertificate; +@property (nonatomic, copy, nullable) MTRCertificateDERBytes * intermediateCertificate; /** * Operational certificate, in X.509 DER form, to use. @@ -173,7 +174,7 @@ NS_ASSUME_NONNULL_BEGIN * If nil, an operational certificate will be determined as described in the * documentation for nodeID. */ -@property (nonatomic, copy, readonly, nullable) NSData * operationalCertificate; +@property (nonatomic, copy, readonly, nullable) MTRCertificateDERBytes * operationalCertificate; /** * Operational keypair to use. If operationalCertificate is not nil, the public @@ -196,14 +197,14 @@ NS_ASSUME_NONNULL_BEGIN * * ipk must be 16 bytes in length */ -- (instancetype)initWithSigningKeypair:(id)nocSigner fabricID:(NSNumber *)fabricID ipk:(NSData *)ipk; +- (instancetype)initWithIPK:(NSData *)ipk fabricID:(NSNumber *)fabricID nocSigner:(id)nocSigner; /** * Prepare to initialize a controller with a complete operational certificate * chain. This initialization method should be used when none of the * certificate-signing private keys are available locally. * - * The fabric id and node if to use will be derived from the provided + * The fabric id and node id to use will be derived from the provided * operationalCertificate. * * intermediateCertificate may be nil if operationalCertificate is signed by @@ -211,11 +212,11 @@ NS_ASSUME_NONNULL_BEGIN * * ipk must be 16 bytes in length. */ -- (instancetype)initWithOperationalKeypair:(id)operationalKeypair - operationalCertificate:(NSData *)operationalCertificate - intermediateCertificate:(nullable NSData *)intermediateCertificate - rootCertificate:(NSData *)rootCertificate - ipk:(NSData *)ipk; +- (instancetype)initWithIPK:(NSData *)ipk + operationalKeypair:(id)operationalKeypair + operationalCertificate:(MTRCertificateDERBytes *)operationalCertificate + intermediateCertificate:(MTRCertificateDERBytes * _Nullable)intermediateCertificate + rootCertificate:(MTRCertificateDERBytes *)rootCertificate; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm index d01c7937350132..22680ecf6d7797 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm @@ -30,7 +30,7 @@ @implementation MTRDeviceControllerStartupParams -- (instancetype)initWithSigningKeypair:(id)nocSigner fabricID:(NSNumber *)fabricID ipk:(NSData *)ipk +- (instancetype)initWithIPK:(NSData *)ipk fabricID:(NSNumber *)fabricID nocSigner:(id)nocSigner { if (!(self = [super init])) { return nil; @@ -48,11 +48,11 @@ - (instancetype)initWithSigningKeypair:(id)nocSigner fabricID:(NSNum return self; } -- (instancetype)initWithOperationalKeypair:(id)operationalKeypair - operationalCertificate:(NSData *)operationalCertificate - intermediateCertificate:(nullable NSData *)intermediateCertificate - rootCertificate:(NSData *)rootCertificate - ipk:(NSData *)ipk +- (instancetype)initWithIPK:(NSData *)ipk + operationalKeypair:(id)operationalKeypair + operationalCertificate:(MTRCertificateDERBytes *)operationalCertificate + intermediateCertificate:(MTRCertificateDERBytes * _Nullable)intermediateCertificate + rootCertificate:(MTRCertificateDERBytes *)rootCertificate { if (!(self = [super init])) { return nil; @@ -179,10 +179,10 @@ - (instancetype)initForNewFabric:(chip::FabricTable *)fabricTable if (self.rootCertificate == nil) { NSError * error; - self.rootCertificate = [MTRCertificates generateRootCertificate:self.nocSigner - issuerID:nil - fabricID:self.fabricID - error:&error]; + self.rootCertificate = [MTRCertificates createRootCertificate:self.nocSigner + issuerID:nil + fabricID:self.fabricID + error:&error]; if (error != nil || self.rootCertificate == nil) { MTR_LOG_ERROR("Failed to generate root certificate: %@", error); return nil; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h index 889dba7d52c298..5094ee0290b132 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h @@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRDeviceControllerStartupParams () // We want to be able to write to operationalCertificate in // MTRDeviceControllerStartupParamsInternal. -@property (nonatomic, copy, nullable) NSData * operationalCertificate; +@property (nonatomic, copy, nullable) MTRCertificateDERBytes * operationalCertificate; // Init method that just copies the values of all our ivars. - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params; @@ -83,12 +83,12 @@ NS_ASSUME_NONNULL_BEGIN keystore:(chip::Crypto::OperationalKeystore *)keystore params:(MTRDeviceControllerStartupParams *)params; -- (instancetype)initWithSigningKeypair:(id)nocSigner fabricID:(NSNumber *)fabricID ipk:(NSData *)ipk NS_UNAVAILABLE; -- (instancetype)initWithOperationalKeypair:(id)operationalKeypair - operationalCertificate:(NSData *)operationalCertificate - intermediateCertificate:(nullable NSData *)intermediateCertificate - rootCertificate:(NSData *)rootCertificate - ipk:(NSData *)ipk NS_UNAVAILABLE; +- (instancetype)initWithIPK:(NSData *)ipk fabricID:(NSNumber *)fabricID nocSigner:(id)nocSigner NS_UNAVAILABLE; +- (instancetype)initWithIPK:(NSData *)ipk + operationalKeypair:(id)operationalKeypair + operationalCertificate:(MTRCertificateDERBytes *)operationalCertificate + intermediateCertificate:(MTRCertificateDERBytes * _Nullable)intermediateCertificate + rootCertificate:(MTRCertificateDERBytes *)rootCertificate NS_UNAVAILABLE; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h index b6c4d01fa57b20..6b69b4a579077e 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h @@ -16,7 +16,7 @@ /** * Parts of MTRDeviceController that are not part of the framework API. Mostly - * for use from MTRControllerFactory. + * for use from MTRDeviceControllerFactory. */ #import @@ -31,7 +31,7 @@ #import "MTRDeviceController.h" @class MTRDeviceControllerStartupParamsInternal; -@class MTRControllerFactory; +@class MTRDeviceControllerFactory; @class MTRDevice; namespace chip { @@ -46,17 +46,17 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRDeviceController (InternalMethods) -#pragma mark - MTRControllerFactory methods +#pragma mark - MTRDeviceControllerFactory methods /** * Start a new controller. Returns whether startup succeeded. If this fails, * it guarantees that it has called controllerShuttingDown on the - * MTRControllerFactory. + * MTRDeviceControllerFactory. * * The return value will always match [controller isRunning] for this * controller. * - * Only MTRControllerFactory should be calling this. + * Only MTRDeviceControllerFactory should be calling this. */ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams; @@ -69,9 +69,9 @@ NS_ASSUME_NONNULL_BEGIN /** * Init a newly created controller. * - * Only MTRControllerFactory should be calling this. + * Only MTRDeviceControllerFactory should be calling this. */ -- (instancetype)initWithFactory:(MTRControllerFactory *)factory queue:(dispatch_queue_t)queue; +- (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory queue:(dispatch_queue_t)queue; /** * Check whether this controller is running on the given fabric, as represented @@ -82,7 +82,7 @@ NS_ASSUME_NONNULL_BEGIN * Might return failure, in which case we don't know whether it's running on the * given fabric. Otherwise it will set *isRunning to the right boolean value. * - * Only MTRControllerFactory should be calling this. + * Only MTRDeviceControllerFactory should be calling this. */ - (CHIP_ERROR)isRunningOnFabric:(chip::FabricTable *)fabricTable fabricIndex:(chip::FabricIndex)fabricIndex @@ -92,10 +92,19 @@ NS_ASSUME_NONNULL_BEGIN * Shut down the underlying C++ controller. Must be called on the Matter work * queue or after the Matter work queue has been shut down. * - * Only MTRControllerFactory should be calling this. + * Only MTRDeviceControllerFactory should be calling this. */ - (void)shutDownCppController; +/** + * Notification that the MTRDeviceControllerFactory has finished shutting down + * this controller and will not be touching it anymore. This is guaranteed to + * be called after initWithFactory succeeds. + * + * Only MTRDeviceControllerFactory should be calling this. + */ +- (void)deinitFromFactory; + /** * Ensure we have a CASE session to the given node ID and then call the provided * connection callback. This may be called on any queue (including the Matter @@ -131,6 +140,13 @@ NS_ASSUME_NONNULL_BEGIN - (void)asyncDispatchToMatterQueue:(void (^)(chip::Controller::DeviceCommissioner *))block errorHandler:(void (^)(NSError *))erroHandler; +/** + * Get an MTRBaseDevice for the given node id. This exists to allow subclasses + * of MTRDeviceController (e.g. MTRDeviceControllerOverXPC) to override what + * sort of MTRBaseDevice they return. + */ +- (MTRBaseDevice *)baseDeviceForNodeID:(NSNumber *)nodeID; + #pragma mark - Device-specific data and SDK access // DeviceController will act as a central repository for this opaque dictionary that MTRDevice manages - (MTRDevice *)deviceForNodeID:(NSNumber *)nodeID; diff --git a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h index 942429a352dd76..9718c3ee34a3f7 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h +++ b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h @@ -19,21 +19,18 @@ #import "MTRCluster.h" // For MTRSubscriptionEstablishedHandler #import "MTRDeviceControllerXPCConnection.h" +@class MTRDeviceControllerOverXPC; + NS_ASSUME_NONNULL_BEGIN @interface MTRDeviceOverXPC : MTRBaseDevice - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; -- (void)subscribeWithQueue:(dispatch_queue_t)queue - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler NS_UNAVAILABLE; - -- (instancetype)initWithController:(id)controller - deviceID:(NSNumber *)deviceID - xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection; + +- (instancetype)initWithControllerOverXPC:(MTRDeviceControllerOverXPC *)controllerOverXPC + deviceID:(NSNumber *)deviceID + xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m index 59994ce0a02ffc..b34c78ed747654 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m +++ b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m @@ -20,6 +20,7 @@ #import "MTRAttributeCacheContainer+XPC.h" #import "MTRCluster.h" #import "MTRDeviceController+XPC.h" +#import "MTRDeviceControllerOverXPC_Internal.h" #import "MTRDeviceControllerXPCConnection.h" #import "MTRError.h" #import "MTRLogging.h" @@ -28,7 +29,8 @@ @interface MTRDeviceOverXPC () -@property (nonatomic, strong, readonly) id controller; +@property (nonatomic, strong, readonly, nullable) id controllerID; +@property (nonatomic, strong, readonly) MTRDeviceControllerOverXPC * controller; @property (nonatomic, readonly) NSNumber * nodeID; @property (nonatomic, strong, readonly) MTRDeviceControllerXPCConnection * xpcConnection; @@ -36,39 +38,37 @@ @interface MTRDeviceOverXPC () @implementation MTRDeviceOverXPC -- (instancetype)initWithController:(id)controller - deviceID:(NSNumber *)deviceID - xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection +- (instancetype)initWithControllerOverXPC:(MTRDeviceControllerOverXPC *)controllerOverXPC + deviceID:(NSNumber *)deviceID + xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection { - _controller = controller; + _controllerID = controllerOverXPC.controllerID; + _controller = controllerOverXPC; _nodeID = deviceID; _xpcConnection = xpcConnection; return self; } - (void)subscribeWithQueue:(dispatch_queue_t)queue - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - params:(nullable MTRSubscribeParams *)params + params:(MTRSubscribeParams *)params attributeCacheContainer:(MTRAttributeCacheContainer * _Nullable)attributeCacheContainer - attributeReportHandler:(nullable void (^)(NSArray * value))attributeReportHandler - eventReportHandler:(nullable void (^)(NSArray * value))eventReportHandler + attributeReportHandler:(void (^_Nullable)(NSArray * value))attributeReportHandler + eventReportHandler:(void (^_Nullable)(NSArray * value))eventReportHandler errorHandler:(void (^)(NSError * error))errorHandler - subscriptionEstablished:(nullable void (^)(void))subscriptionEstablishedHandler + subscriptionEstablished:(void (^_Nullable)(void))subscriptionEstablishedHandler resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduledHandler { MTR_LOG_DEBUG("Subscribing all attributes... Note that attributeReportHandler, eventReportHandler, and resubscriptionScheduled " "are not supported."); - if (attributeCacheContainer) { - [attributeCacheContainer setXPCConnection:_xpcConnection controllerID:self.controller deviceID:self.nodeID]; - } - [_xpcConnection - getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + __auto_type workBlock = ^{ + if (attributeCacheContainer) { + [attributeCacheContainer setXPCConnection:self->_xpcConnection controllerID:self.controllerID deviceID:self.nodeID]; + } + [self->_xpcConnection getProxyHandleWithCompletion:^( + dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { if (handle) { - [handle.proxy subscribeWithController:self.controller + [handle.proxy subscribeWithController:self.controllerID nodeID:self.nodeID - minInterval:minInterval - maxInterval:maxInterval params:[MTRDeviceController encodeXPCSubscribeParams:params] shouldCache:(attributeCacheContainer != nil) completion:^(NSError * _Nullable error) { @@ -89,20 +89,38 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue }); } }]; + }; + + if (self.controllerID != nil) { + workBlock(); + } else { + [self.controller fetchControllerIdWithQueue:queue + completion:^(id _Nullable controllerID, NSError * _Nullable error) { + if (error != nil) { + // We're already running on the right queue. + errorHandler(error); + return; + } + + self->_controllerID = controllerID; + workBlock(); + }]; + } } -- (void)readAttributeWithEndpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - params:(MTRReadParams * _Nullable)params - queue:(dispatch_queue_t)queue - completion:(MTRDeviceResponseHandler)completion +- (void)readAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID + clusterID:(NSNumber * _Nullable)clusterID + attributeID:(NSNumber * _Nullable)attributeID + params:(MTRReadParams * _Nullable)params + queue:(dispatch_queue_t)queue + completion:(MTRDeviceResponseHandler)completion { MTR_LOG_DEBUG("Reading attribute ..."); - [_xpcConnection - getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + __auto_type workBlock = ^{ + [self->_xpcConnection getProxyHandleWithCompletion:^( + dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { if (handle) { - [handle.proxy readAttributeWithController:self.controller + [handle.proxy readAttributeWithController:self.controllerID nodeID:self.nodeID endpointID:endpointID clusterID:clusterID @@ -125,6 +143,23 @@ - (void)readAttributeWithEndpointID:(NSNumber * _Nullable)endpointID }); } }]; + }; + + if (self.controllerID != nil) { + workBlock(); + } else { + [self.controller fetchControllerIdWithQueue:queue + completion:^(id _Nullable controllerID, NSError * _Nullable error) { + if (error != nil) { + // We're already running on the right queue. + completion(nil, error); + return; + } + + self->_controllerID = controllerID; + workBlock(); + }]; + } } - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID @@ -136,10 +171,11 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID completion:(MTRDeviceResponseHandler)completion { MTR_LOG_DEBUG("Writing attribute ..."); - [_xpcConnection - getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + __auto_type workBlock = ^{ + [self->_xpcConnection getProxyHandleWithCompletion:^( + dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { if (handle) { - [handle.proxy writeAttributeWithController:self.controller + [handle.proxy writeAttributeWithController:self.controllerID nodeID:self.nodeID endpointID:endpointID clusterID:clusterID @@ -163,6 +199,23 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID }); } }]; + }; + + if (self.controllerID != nil) { + workBlock(); + } else { + [self.controller fetchControllerIdWithQueue:queue + completion:^(id _Nullable controllerID, NSError * _Nullable error) { + if (error != nil) { + // We're already running on the right queue. + completion(nil, error); + return; + } + + self->_controllerID = controllerID; + workBlock(); + }]; + } } - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID @@ -174,10 +227,11 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID completion:(MTRDeviceResponseHandler)completion { MTR_LOG_DEBUG("Invoking command ..."); - [_xpcConnection - getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + __auto_type workBlock = ^{ + [self->_xpcConnection getProxyHandleWithCompletion:^( + dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { if (handle) { - [handle.proxy invokeCommandWithController:self.controller + [handle.proxy invokeCommandWithController:self.controllerID nodeID:self.nodeID endpointID:endpointID clusterID:clusterID @@ -201,93 +255,146 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID }); } }]; + }; + + if (self.controllerID != nil) { + workBlock(); + } else { + [self.controller fetchControllerIdWithQueue:queue + completion:^(id _Nullable controllerID, NSError * _Nullable error) { + if (error != nil) { + // We're already running on the right queue. + completion(nil, error); + return; + } + + self->_controllerID = controllerID; + workBlock(); + }]; + } } -- (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - params:(MTRSubscribeParams * _Nullable)params - queue:(dispatch_queue_t)queue - reportHandler:(MTRDeviceResponseHandler)reportHandler - subscriptionEstablished:(void (^_Nullable)(void))subscriptionEstablishedHandler +- (void)subscribeAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID + clusterID:(NSNumber * _Nullable)clusterID + attributeID:(NSNumber * _Nullable)attributeID + params:(MTRSubscribeParams *)params + queue:(dispatch_queue_t)queue + reportHandler:(MTRDeviceResponseHandler)reportHandler + subscriptionEstablished:(void (^_Nullable)(void))subscriptionEstablishedHandler { MTR_LOG_DEBUG("Subscribing attribute ..."); - [_xpcConnection getProxyHandleWithCompletion:^( - dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { - if (handle) { - MTR_LOG_DEBUG("Setup report handler"); - [self.xpcConnection - registerReportHandlerWithController:self.controller - nodeID:self.nodeID - handler:^(id _Nullable values, NSError * _Nullable error) { - if (values && ![values isKindOfClass:[NSArray class]]) { - MTR_LOG_ERROR("Unsupported report format"); - return; - } - if (!values) { - MTR_LOG_DEBUG("Error report received"); - dispatch_async(queue, ^{ - reportHandler(values, error); - }); - return; - } - __auto_type decodedValues = [MTRDeviceController decodeXPCResponseValues:values]; - NSMutableArray *> * filteredValues = - [NSMutableArray arrayWithCapacity:[decodedValues count]]; - for (NSDictionary * decodedValue in decodedValues) { - MTRAttributePath * attributePath = decodedValue[MTRAttributePathKey]; - if ((endpointID == nil || [attributePath.endpoint isEqualToNumber:endpointID]) - && (clusterID == nil || [attributePath.cluster isEqualToNumber:clusterID]) - && (attributeID == nil || - [attributePath.attribute isEqualToNumber:attributeID])) { - [filteredValues addObject:decodedValue]; + __auto_type workBlock = ^{ + [self->_xpcConnection getProxyHandleWithCompletion:^( + dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + if (handle) { + MTR_LOG_DEBUG("Setup report handler"); + [self.xpcConnection + registerReportHandlerWithController:self.controllerID + nodeID:self.nodeID + handler:^(id _Nullable values, NSError * _Nullable error) { + if (values && ![values isKindOfClass:[NSArray class]]) { + MTR_LOG_ERROR("Unsupported report format"); + return; } - } - if ([filteredValues count] > 0) { - MTR_LOG_DEBUG("Report received"); - dispatch_async(queue, ^{ - reportHandler(filteredValues, error); - }); - } + if (!values) { + MTR_LOG_DEBUG("Error report received"); + dispatch_async(queue, ^{ + reportHandler(values, error); + }); + return; + } + __auto_type decodedValues = + [MTRDeviceController decodeXPCResponseValues:values]; + NSMutableArray *> * filteredValues = + [NSMutableArray arrayWithCapacity:[decodedValues count]]; + for (NSDictionary * decodedValue in decodedValues) { + MTRAttributePath * attributePath = decodedValue[MTRAttributePathKey]; + if ((endpointID == nil || + [attributePath.endpoint isEqualToNumber:endpointID]) + && (clusterID == nil || + [attributePath.cluster isEqualToNumber:clusterID]) + && (attributeID == nil || + [attributePath.attribute isEqualToNumber:attributeID])) { + [filteredValues addObject:decodedValue]; + } + } + if ([filteredValues count] > 0) { + MTR_LOG_DEBUG("Report received"); + dispatch_async(queue, ^{ + reportHandler(filteredValues, error); + }); + } + }]; + + [handle.proxy subscribeAttributeWithController:self.controllerID + nodeID:self.nodeID + endpointID:endpointID + clusterID:clusterID + attributeID:attributeID + params:[MTRDeviceController encodeXPCSubscribeParams:params] + establishedHandler:^{ + dispatch_async(queue, ^{ + MTR_LOG_DEBUG("Subscription established"); + subscriptionEstablishedHandler(); + // The following captures the proxy handle in the closure so that the handle + // won't be released prior to block call. + __auto_type handleRetainer = handle; + (void) handleRetainer; + }); }]; - [handle.proxy subscribeAttributeWithController:self.controller - nodeID:self.nodeID - endpointID:endpointID - clusterID:clusterID - attributeID:attributeID - minInterval:minInterval - maxInterval:maxInterval - params:[MTRDeviceController encodeXPCSubscribeParams:params] - establishedHandler:^{ - dispatch_async(queue, ^{ - MTR_LOG_DEBUG("Subscription established"); - subscriptionEstablishedHandler(); - // The following captures the proxy handle in the closure so that the handle - // won't be released prior to block call. - __auto_type handleRetainer = handle; - (void) handleRetainer; - }); - }]; - } else { - dispatch_async(queue, ^{ - MTR_LOG_ERROR("Failed to obtain XPC connection to subscribe to attribute"); - subscriptionEstablishedHandler(); - reportHandler(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); - }); - } - }]; + } else { + dispatch_async(queue, ^{ + MTR_LOG_ERROR("Failed to obtain XPC connection to subscribe to attribute"); + subscriptionEstablishedHandler(); + reportHandler(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + }); + } + }]; + }; + + if (self.controllerID != nil) { + workBlock(); + } else { + [self.controller fetchControllerIdWithQueue:queue + completion:^(id _Nullable controllerID, NSError * _Nullable error) { + if (error != nil) { + // We're already running on the right queue. + reportHandler(nil, error); + return; + } + + self->_controllerID = controllerID; + workBlock(); + }]; + } } - (void)deregisterReportHandlersWithQueue:(dispatch_queue_t)queue completion:(void (^)(void))completion { MTR_LOG_DEBUG("Deregistering report handlers"); - [_xpcConnection deregisterReportHandlersWithController:self.controller - nodeID:self.nodeID - completion:^{ - dispatch_async(queue, completion); - }]; + __auto_type workBlock = ^{ + [self->_xpcConnection deregisterReportHandlersWithController:self.controllerID + nodeID:self.nodeID + completion:^{ + dispatch_async(queue, completion); + }]; + }; + + if (self.controllerID != nil) { + workBlock(); + } else { + [self.controller fetchControllerIdWithQueue:queue + completion:^(id _Nullable controllerID, NSError * _Nullable error) { + if (error != nil) { + // We're already running on the right queue. + completion(); + return; + } + + self->_controllerID = controllerID; + workBlock(); + }]; + } } - (void)openCommissioningWindowWithSetupPasscode:(NSNumber *)setupPasscode diff --git a/src/darwin/Framework/CHIP/MTRError.h b/src/darwin/Framework/CHIP/MTRError.h index d0c91185b3de41..ffed8c8be3b9df 100644 --- a/src/darwin/Framework/CHIP/MTRError.h +++ b/src/darwin/Framework/CHIP/MTRError.h @@ -75,35 +75,26 @@ typedef NS_ERROR_ENUM(MTRErrorDomain, MTRErrorCode){ // clang-format off typedef NS_ERROR_ENUM(MTRInteractionErrorDomain, MTRInteractionErrorCode){ // These values come from the general status code table in the Matter - // Interaction Model specification. Do not change these values unless the - // specification changes. + // Interaction Model specification. MTRInteractionErrorCodeFailure = 0x01, MTRInteractionErrorCodeInvalidSubscription = 0x7d, MTRInteractionErrorCodeUnsupportedAccess = 0x7e, MTRInteractionErrorCodeUnsupportedEndpoint = 0x7f, MTRInteractionErrorCodeInvalidAction = 0x80, MTRInteractionErrorCodeUnsupportedCommand = 0x81, - // Gap in values is intentional. MTRInteractionErrorCodeInvalidCommand = 0x85, MTRInteractionErrorCodeUnsupportedAttribute = 0x86, MTRInteractionErrorCodeConstraintError = 0x87, MTRInteractionErrorCodeUnsupportedWrite = 0x88, MTRInteractionErrorCodeResourceExhausted = 0x89, - // Gap in values is intentional. MTRInteractionErrorCodeNotFound = 0x8b, MTRInteractionErrorCodeUnreportableAttribute = 0x8c, MTRInteractionErrorCodeInvalidDataType = 0x8d, - // Gap in values is intentional. MTRInteractionErrorCodeUnsupportedRead = 0x8f, - // Gap in values is intentional. MTRInteractionErrorCodeDataVersionMismatch = 0x92, - // Gap in values is intentional. MTRInteractionErrorCodeTimeout = 0x94, - // Gap in values is intentional. MTRInteractionErrorCodeBusy = 0x9c, - // Gap in values is intentional. MTRInteractionErrorCodeUnsupportedCluster = 0xc3, - // Gap in values is intentional. MTRInteractionErrorCodeNoUpstreamSubscription = 0xc5, MTRInteractionErrorCodeNeedsTimedInteraction = 0xc6, MTRInteractionErrorCodeUnsupportedEvent = 0xc7, diff --git a/src/darwin/Framework/CHIP/MTRError_Internal.h b/src/darwin/Framework/CHIP/MTRError_Internal.h index e5e58b3f0f9568..6eaba254b36398 100644 --- a/src/darwin/Framework/CHIP/MTRError_Internal.h +++ b/src/darwin/Framework/CHIP/MTRError_Internal.h @@ -23,8 +23,8 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRError : NSObject -+ (nullable NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode; -+ (nullable NSError *)errorForIMStatus:(const chip::app::StatusIB &)status; ++ (NSError * _Nullable)errorForCHIPErrorCode:(CHIP_ERROR)errorCode; ++ (NSError * _Nullable)errorForIMStatus:(const chip::app::StatusIB &)status; + (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error; @end diff --git a/src/darwin/Framework/CHIP/MTRManualSetupPayloadParser.h b/src/darwin/Framework/CHIP/MTRManualSetupPayloadParser.h index 673a43c8909abc..2f6bcb2ecf0b90 100644 --- a/src/darwin/Framework/CHIP/MTRManualSetupPayloadParser.h +++ b/src/darwin/Framework/CHIP/MTRManualSetupPayloadParser.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRManualSetupPayloadParser : NSObject - (instancetype)initWithDecimalStringRepresentation:(NSString *)decimalStringRepresentation; -- (nullable MTRSetupPayload *)populatePayload:(NSError * __autoreleasing *)error; +- (MTRSetupPayload * _Nullable)populatePayload:(NSError * __autoreleasing *)error; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAHeader.h b/src/darwin/Framework/CHIP/MTROTAHeader.h new file mode 100644 index 00000000000000..0684cdb66697aa --- /dev/null +++ b/src/darwin/Framework/CHIP/MTROTAHeader.h @@ -0,0 +1,111 @@ +/** + * + * Copyright (c) 2022 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 + +/** + * A representation of an OTA image header as defined in the Matter + * specification's "Over-the-Air (OTA) Software Update File Format" section. + */ + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, MTROTAImageDigestType) { + MTROTAImageDigestTypeSha256 = 1, + MTROTAImageDigestTypeSha256_128, + MTROTAImageDigestTypeSha256_120, + MTROTAImageDigestTypeSha256_96, + MTROTAImageDigestTypeSha256_64, + MTROTAImageDigestTypeSha256_32, + MTROTAImageDigestTypeSha384, + MTROTAImageDigestTypeSha512, + MTROTAImageDigestTypeSha3_224, + MTROTAImageDigestTypeSha3_256, + MTROTAImageDigestTypeSha3_384, + MTROTAImageDigestTypeSha3_512, +}; + +@interface MTROTAHeader : NSObject + +/** + * The identifier of the vendor whose product this image is meant for. + * + * This field can be compared to the vendor id received in the Query Image + * command to determine whether an image matches. + * + * This field may be 0, in which case the image might apply to products from + * more than one vendor. If it's nonzero, it must match the vendor id in Query + * Image for this image to be considered. + */ +@property (nonatomic, copy) NSNumber * vendorID; +/** + * The identifier of the specific product the image is meant for. May be 0, if + * the image might apply to more than one product. This is allowed, but not + * required, to be matched against the product id received in Query Image. + */ +@property (nonatomic, copy) NSNumber * productID; +/** + * The size of the actual image payload, which follows the header in the OTA + * file. + */ +@property (nonatomic, copy) NSNumber * payloadSize; +/** + * The version of the software contained in this image. This is the version the + * OTA requestor will be updated to if this image is installed. This can be + * used to determine whether this image is newer than what the requestor is + * currently running, by comparing it to the SoftwareVersion in the Query Image + * command. + */ +@property (nonatomic, copy) NSNumber * softwareVersion; +/** + * Human-readable version of softwareVersion. This must not be used for + * deciding which versions are newer or older; use softwareVersion for that. + */ +@property (nonatomic, copy) NSString * softwareVersionString; +/** + * If not nil a URL pointing to release notes for the software update + * represented by the image. + */ +@property (nonatomic, copy, nullable) NSString * releaseNotesURL; +/** + * A digest of the payload that follows the header. Can be used to verify that + * the payload is not truncated or corrupted. + */ +@property (nonatomic, copy) NSData * imageDigest; +/** + * The specific algorithm that was used to compute imageDigest. + */ +@property (nonatomic, assign) MTROTAImageDigestType imageDigestType; +/** + * If not nil, specifies the smallest software version that this update can be + * applied on top of. In that case, this value must be compared to the + * SoftwareVersion in the QueryImage command to check whether this image is + * valid for the OTA requestor. + */ +@property (nonatomic, copy, nullable) NSNumber * minApplicableVersion; +/** + * If not nil, specifies the largest software version that this update can be + * applied on top of. In that case, this value must be compared to the + * SoftwareVersion in the QueryImage command to check whether this image is + * valid for the OTA requestor. + */ +@property (nonatomic, copy, nullable) NSNumber * maxApplicableVersion; + ++ (nullable MTROTAHeader *)headerFromData:(NSData *)data error:(NSError * __autoreleasing *)error; +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAHeaderParser.mm b/src/darwin/Framework/CHIP/MTROTAHeader.mm similarity index 85% rename from src/darwin/Framework/CHIP/MTROTAHeaderParser.mm rename to src/darwin/Framework/CHIP/MTROTAHeader.mm index 558d590e98e5c1..2cb6882af34125 100644 --- a/src/darwin/Framework/CHIP/MTROTAHeaderParser.mm +++ b/src/darwin/Framework/CHIP/MTROTAHeader.mm @@ -15,7 +15,7 @@ * limitations under the License. */ -#import "MTROTAHeaderParser.h" +#import "MTROTAHeader.h" #import "MTRError.h" #import "MTRError_Internal.h" @@ -25,17 +25,16 @@ #include @implementation MTROTAHeader -@end - -@implementation MTROTAHeaderParser -+ (nullable MTROTAHeader *)headerFromData:(NSData *)data error:(NSError * __autoreleasing *)error ++ (MTROTAHeader * _Nullable)headerFromData:(NSData *)data error:(NSError * __autoreleasing *)error { chip::OTAImageHeaderParser parser; parser.Init(); if (!parser.IsInitialized()) { - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]; + if (error != nil) { + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]; + } return nil; } @@ -43,7 +42,9 @@ + (nullable MTROTAHeader *)headerFromData:(NSData *)data error:(NSError * __auto chip::OTAImageHeader header; CHIP_ERROR err = parser.AccumulateAndDecode(buffer, header); if (err != CHIP_NO_ERROR) { - *error = [MTRError errorForCHIPErrorCode:err]; + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:err]; + } parser.Clear(); return nil; } diff --git a/src/darwin/Framework/CHIP/MTROTAHeaderParser.h b/src/darwin/Framework/CHIP/MTROTAHeaderParser.h deleted file mode 100644 index d578af8cae05b8..00000000000000 --- a/src/darwin/Framework/CHIP/MTROTAHeaderParser.h +++ /dev/null @@ -1,56 +0,0 @@ -/** - * - * Copyright (c) 2022 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 - -NS_ASSUME_NONNULL_BEGIN - -typedef NS_ENUM(NSUInteger, MTROTAImageDigestType) { - MTROTAImageDigestTypeSha256 = 1, - MTROTAImageDigestTypeSha256_128, - MTROTAImageDigestTypeSha256_120, - MTROTAImageDigestTypeSha256_96, - MTROTAImageDigestTypeSha256_64, - MTROTAImageDigestTypeSha256_32, - MTROTAImageDigestTypeSha384, - MTROTAImageDigestTypeSha512, - MTROTAImageDigestTypeSha3_224, - MTROTAImageDigestTypeSha3_256, - MTROTAImageDigestTypeSha3_384, - MTROTAImageDigestTypeSha3_512, -}; - -@interface MTROTAHeader : NSObject - -@property (nonatomic, strong) NSNumber * vendorID; -@property (nonatomic, strong) NSNumber * productID; -@property (nonatomic, strong) NSNumber * payloadSize; -@property (nonatomic, strong) NSNumber * softwareVersion; -@property (nonatomic, strong) NSString * softwareVersionString; -@property (nonatomic, strong) NSString * releaseNotesURL; -@property (nonatomic, strong) NSData * imageDigest; -@property (nonatomic, assign) MTROTAImageDigestType imageDigestType; -@property (nonatomic, strong) NSNumber * minApplicableVersion; -@property (nonatomic, strong) NSNumber * maxApplicableVersion; - -@end - -@interface MTROTAHeaderParser : NSObject -+ (nullable MTROTAHeader *)headerFromData:(NSData *)data error:(NSError * __autoreleasing *)error; -@end - -NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm index 2b2234cc011ce4..6c7e668d3ed213 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm @@ -16,7 +16,7 @@ */ #import "MTROTAProviderDelegateBridge.h" -#import "MTRControllerFactory_Internal.h" +#import "MTRDeviceControllerFactory_Internal.h" #import "NSDataSpanConversion.h" #import "NSStringSpanConversion.h" @@ -149,7 +149,7 @@ CHIP_ERROR OnTransferSessionBegin(TransferSession::OutputEvent & event) }); }; - auto * controller = [[MTRControllerFactory sharedInstance] runningControllerForFabricIndex:mFabricIndex.Value()]; + auto * controller = [[MTRDeviceControllerFactory sharedInstance] runningControllerForFabricIndex:mFabricIndex.Value()]; VerifyOrReturnError(controller != nil, CHIP_ERROR_INCORRECT_STATE); auto nodeId = @(mNodeId.Value()); @@ -177,7 +177,7 @@ CHIP_ERROR OnTransferSessionEnd(TransferSession::OutputEvent & event) error = CHIP_ERROR_INTERNAL; } - auto * controller = [[MTRControllerFactory sharedInstance] runningControllerForFabricIndex:mFabricIndex.Value()]; + auto * controller = [[MTRDeviceControllerFactory sharedInstance] runningControllerForFabricIndex:mFabricIndex.Value()]; VerifyOrReturnError(controller != nil, CHIP_ERROR_INCORRECT_STATE); auto nodeId = @(mNodeId.Value()); @@ -227,7 +227,7 @@ CHIP_ERROR OnBlockQuery(TransferSession::OutputEvent & event) // TODO Handle MaxLength - auto * controller = [[MTRControllerFactory sharedInstance] runningControllerForFabricIndex:mFabricIndex.Value()]; + auto * controller = [[MTRDeviceControllerFactory sharedInstance] runningControllerForFabricIndex:mFabricIndex.Value()]; VerifyOrReturnError(controller != nil, CHIP_ERROR_INCORRECT_STATE); auto nodeId = @(mNodeId.Value()); @@ -368,7 +368,7 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath } auto * controller = - [[MTRControllerFactory sharedInstance] runningControllerForFabricIndex:commandHandler->GetAccessingFabricIndex()]; + [[MTRDeviceControllerFactory sharedInstance] runningControllerForFabricIndex:commandHandler->GetAccessingFabricIndex()]; if (controller == nil) { commandHandler->AddStatus(commandPath, Status::Failure); return false; diff --git a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h index a3edfce8e600aa..b84672b791695f 100644 --- a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h +++ b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h @@ -29,8 +29,8 @@ typedef NS_ENUM(NSUInteger, MTROnboardingPayloadType) { @interface MTROnboardingPayloadParser : NSObject -+ (nullable MTRSetupPayload *)setupPayloadForOnboardingPayload:(NSString *)onboardingPayload - error:(NSError * __autoreleasing *)error; ++ (MTRSetupPayload * _Nullable)setupPayloadForOnboardingPayload:(NSString *)onboardingPayload + error:(NSError * __autoreleasing *)error; @end diff --git a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m index 123da2918e8d5e..fb73932d5a3a42 100644 --- a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m +++ b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m @@ -27,8 +27,8 @@ + (bool)isQRCode:(NSString *)codeString return [codeString hasPrefix:@"MT:"]; } -+ (nullable MTRSetupPayload *)setupPayloadForOnboardingPayload:(NSString *)onboardingPayload - error:(NSError * __autoreleasing *)error ++ (MTRSetupPayload * _Nullable)setupPayloadForOnboardingPayload:(NSString *)onboardingPayload + error:(NSError * __autoreleasing *)error { MTRSetupPayload * payload; // MTROnboardingPayloadTypeNFC is of type QR code and handled same as QR code @@ -47,16 +47,16 @@ + (nullable MTRSetupPayload *)setupPayloadForOnboardingPayload:(NSString *)onboa return payload; } -+ (nullable MTRSetupPayload *)setupPayloadForQRCodeOnboardingPayload:(NSString *)onboardingPayload - error:(NSError * __autoreleasing *)error ++ (MTRSetupPayload * _Nullable)setupPayloadForQRCodeOnboardingPayload:(NSString *)onboardingPayload + error:(NSError * __autoreleasing *)error { MTRQRCodeSetupPayloadParser * qrCodeParser = [[MTRQRCodeSetupPayloadParser alloc] initWithBase38Representation:onboardingPayload]; return [qrCodeParser populatePayload:error]; } -+ (nullable MTRSetupPayload *)setupPayloadForManualCodeOnboardingPayload:(NSString *)onboardingPayload - error:(NSError * __autoreleasing *)error ++ (MTRSetupPayload * _Nullable)setupPayloadForManualCodeOnboardingPayload:(NSString *)onboardingPayload + error:(NSError * __autoreleasing *)error { MTRManualSetupPayloadParser * manualParser = [[MTRManualSetupPayloadParser alloc] initWithDecimalStringRepresentation:onboardingPayload]; diff --git a/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.h b/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.h index dfa210c74e31ae..6b5f13452182e9 100644 --- a/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.h +++ b/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.h @@ -15,7 +15,7 @@ * limitations under the License. */ -#import "MTRPersistentStorageDelegate.h" +#import "MTRStorage.h" #import "MTRError_Internal.h" #include @@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN class MTRPersistentStorageDelegateBridge : public chip::PersistentStorageDelegate { public: - MTRPersistentStorageDelegateBridge(id delegate); + MTRPersistentStorageDelegateBridge(id delegate); ~MTRPersistentStorageDelegateBridge(); CHIP_ERROR SyncGetKeyValue(const char * key, void * buffer, uint16_t & size) override; @@ -35,7 +35,7 @@ class MTRPersistentStorageDelegateBridge : public chip::PersistentStorageDelegat CHIP_ERROR SyncDeleteKeyValue(const char * key) override; private: - id mDelegate; + id mDelegate; dispatch_queue_t mWorkQueue; }; diff --git a/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.mm b/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.mm index cf74e08ab028df..bc14ad1020cafe 100644 --- a/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.mm @@ -17,7 +17,7 @@ #import "MTRPersistentStorageDelegateBridge.h" -MTRPersistentStorageDelegateBridge::MTRPersistentStorageDelegateBridge(id delegate) +MTRPersistentStorageDelegateBridge::MTRPersistentStorageDelegateBridge(id delegate) : mDelegate(delegate) , mWorkQueue(dispatch_queue_create("com.csa.matter.framework.storage.workqueue", DISPATCH_QUEUE_SERIAL)) { diff --git a/src/darwin/Framework/CHIP/MTRQRCodeSetupPayloadParser.h b/src/darwin/Framework/CHIP/MTRQRCodeSetupPayloadParser.h index ab0e6f63017496..9a93a52113405e 100644 --- a/src/darwin/Framework/CHIP/MTRQRCodeSetupPayloadParser.h +++ b/src/darwin/Framework/CHIP/MTRQRCodeSetupPayloadParser.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRQRCodeSetupPayloadParser : NSObject - (instancetype)initWithBase38Representation:(NSString *)base38Representation; -- (nullable MTRSetupPayload *)populatePayload:(NSError * __autoreleasing *)error; +- (MTRSetupPayload * _Nullable)populatePayload:(NSError * __autoreleasing *)error; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload.h b/src/darwin/Framework/CHIP/MTRSetupPayload.h index 4b9c3298352e06..721ccdd67a5781 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload.h +++ b/src/darwin/Framework/CHIP/MTRSetupPayload.h @@ -77,7 +77,7 @@ typedef NS_ENUM(NSUInteger, MTROptionalQRCodeInfoType) { MTROptionalQRCodeInfoTy @property (nonatomic, copy) NSNumber * setupPasscode; @property (nonatomic, copy, nullable) NSString * serialNumber; -- (nullable NSArray *)getAllOptionalVendorData:(NSError * __autoreleasing *)error; +- (NSArray * _Nullable)getAllOptionalVendorData:(NSError * __autoreleasing *)error; /** * Generate a random Matter-valid setup passcode. @@ -92,8 +92,26 @@ typedef NS_ENUM(NSUInteger, MTROptionalQRCodeInfoType) { MTROptionalQRCodeInfoTy + (MTRSetupPayload * _Nullable)setupPayloadWithOnboardingPayload:(NSString *)onboardingPayload error:(NSError * __autoreleasing *)error; +/** + * Initialize an MTRSetupPayload with the given passcode and discriminator. + * This will pre-set version, product id, and vendor id to 0. + */ +- (instancetype)initWithSetupPasscode:(NSNumber *)setupPasscode discriminator:(NSNumber *)discriminator; + /** Get 11 digit manual entry code from the setup payload. */ -- (nullable NSString *)manualEntryCode; +- (NSString * _Nullable)manualEntryCode; + +/** + * Get a QR code from the setup payload. + * + * Returns nil on failure (e.g. if the setup payload does not have all the + * information a QR code needs). + */ +- (NSString * _Nullable)qrCodeString; + +// A setup payload must have a passcode and a discriminator at the very least. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; @end diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload.mm b/src/darwin/Framework/CHIP/MTRSetupPayload.mm index 7c2df4dbbdd178..2069cd06e6ebb8 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload.mm +++ b/src/darwin/Framework/CHIP/MTRSetupPayload.mm @@ -20,6 +20,7 @@ #import "MTROnboardingPayloadParser.h" #import "MTRSetupPayload_Internal.h" #import "setup_payload/ManualSetupPayloadGenerator.h" +#import "setup_payload/QRCodeSetupPayloadGenerator.h" #import @implementation MTROptionalQRCodeInfo @@ -52,6 +53,25 @@ - (MTRDiscoveryCapabilities)convertRendezvousFlags:(const chip::Optional)convertDiscoveryCapabilities:(MTRDiscoveryCapabilities)value +{ + if (value == MTRDiscoveryCapabilitiesUnknown) { + return chip::NullOptional; + } + + chip::RendezvousInformationFlags flags; + if (value & MTRDiscoveryCapabilitiesBLE) { + flags.Set(chip::RendezvousInformationFlag::kBLE); + } + if (value & MTRDiscoveryCapabilitiesSoftAP) { + flags.Set(chip::RendezvousInformationFlag::kSoftAP); + } + if (value & MTRDiscoveryCapabilitiesOnNetwork) { + flags.Set(chip::RendezvousInformationFlag::kOnNetwork); + } + return chip::MakeOptional(flags); +} + - (MTRCommissioningFlow)convertCommissioningFlow:(chip::CommissioningFlow)value { if (value == chip::CommissioningFlow::kStandard) { @@ -66,7 +86,23 @@ - (MTRCommissioningFlow)convertCommissioningFlow:(chip::CommissioningFlow)value return MTRCommissioningFlowInvalid; } -- (id)initWithSetupPayload:(chip::SetupPayload)setupPayload ++ (chip::CommissioningFlow)unconvertCommissioningFlow:(MTRCommissioningFlow)value +{ + if (value == MTRCommissioningFlowStandard) { + return chip::CommissioningFlow::kStandard; + } + if (value == MTRCommissioningFlowUserActionRequired) { + return chip::CommissioningFlow::kUserActionRequired; + } + if (value == MTRCommissioningFlowCustom) { + return chip::CommissioningFlow::kCustom; + } + // It's MTRCommissioningFlowInvalid ... now what? But in practice + // this is not called when we have MTRCommissioningFlowInvalid. + return chip::CommissioningFlow::kStandard; +} + +- (instancetype)initWithSetupPayload:(chip::SetupPayload)setupPayload { if (self = [super init]) { _chipSetupPayload = setupPayload; @@ -88,6 +124,22 @@ - (id)initWithSetupPayload:(chip::SetupPayload)setupPayload return self; } +- (instancetype)initWithSetupPasscode:(NSNumber *)setupPasscode discriminator:(NSNumber *)discriminator +{ + if (self = [super init]) { + _version = @(0); // Only supported Matter version so far. + _vendorID = @(0); // Not available. + _productID = @(0); // Not available. + _commissioningFlow = MTRCommissioningFlowStandard; + _discoveryCapabilities = MTRDiscoveryCapabilitiesUnknown; + _hasShortDiscriminator = NO; + _discriminator = discriminator; + _setupPasscode = setupPasscode; + _serialNumber = nil; + } + return self; +} + - (void)getSerialNumber:(chip::SetupPayload)setupPayload { std::string serialNumberC; @@ -182,7 +234,7 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:self.serialNumber forKey:MTRSetupPayloadCodingKeySerialNumber]; } -- (nullable instancetype)initWithCoder:(NSCoder *)decoder +- (instancetype _Nullable)initWithCoder:(NSCoder *)decoder { NSNumber * version = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeyVersion]; NSNumber * vendorID = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeyVendorID]; @@ -208,7 +260,7 @@ - (nullable instancetype)initWithCoder:(NSCoder *)decoder return payload; } -- (nullable NSString *)manualEntryCode +- (NSString * _Nullable)manualEntryCode { CHIP_ERROR err = CHIP_NO_ERROR; std::string outDecimalString; @@ -233,4 +285,41 @@ - (nullable NSString *)manualEntryCode return [NSString stringWithUTF8String:outDecimalString.c_str()]; } +- (NSString * _Nullable)qrCodeString +{ + if (self.commissioningFlow == MTRCommissioningFlowInvalid) { + // No idea how to map this to the standard codes. + return nil; + } + + if (self.hasShortDiscriminator) { + // Can't create a QR code with a short discriminator. + return nil; + } + + if (self.discoveryCapabilities == MTRDiscoveryCapabilitiesUnknown) { + // Can't create a QR code if we don't know the discovery capabilities. + return nil; + } + + chip::SetupPayload payload; + + payload.version = [self.version unsignedCharValue]; + payload.vendorID = [self.vendorID unsignedShortValue]; + payload.productID = [self.productID unsignedShortValue]; + payload.commissioningFlow = [MTRSetupPayload unconvertCommissioningFlow:self.commissioningFlow]; + payload.rendezvousInformation = [MTRSetupPayload convertDiscoveryCapabilities:self.discoveryCapabilities]; + payload.discriminator.SetLongValue([self.discriminator unsignedShortValue]); + payload.setUpPINCode = [self.setupPasscode unsignedIntValue]; + + std::string outDecimalString; + CHIP_ERROR err = chip::QRCodeSetupPayloadGenerator(payload).payloadBase38Representation(outDecimalString); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + return [NSString stringWithUTF8String:outDecimalString.c_str()]; +} + @end diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload_Internal.h b/src/darwin/Framework/CHIP/MTRSetupPayload_Internal.h index 7950d029c84790..6cac43e7d5ea4b 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload_Internal.h +++ b/src/darwin/Framework/CHIP/MTRSetupPayload_Internal.h @@ -17,7 +17,7 @@ @interface MTRSetupPayload () #ifdef __cplusplus -- (id)initWithSetupPayload:(chip::SetupPayload)setupPayload; +- (instancetype)initWithSetupPayload:(chip::SetupPayload)setupPayload; - (MTRDiscoveryCapabilities)convertRendezvousFlags:(const chip::Optional &)value; - (MTRCommissioningFlow)convertCommissioningFlow:(chip::CommissioningFlow)value; #endif diff --git a/src/darwin/Framework/CHIP/MTRPersistentStorageDelegate.h b/src/darwin/Framework/CHIP/MTRStorage.h similarity index 79% rename from src/darwin/Framework/CHIP/MTRPersistentStorageDelegate.h rename to src/darwin/Framework/CHIP/MTRStorage.h index 248df57d67b60d..2dcba9d330a8c7 100644 --- a/src/darwin/Framework/CHIP/MTRPersistentStorageDelegate.h +++ b/src/darwin/Framework/CHIP/MTRStorage.h @@ -20,18 +20,19 @@ NS_ASSUME_NONNULL_BEGIN /** - * The protocol definition for the CHIPPersistenStorageDelegate + * This protocol is used by the Matter framework to read and write storage. * - * All delegate methods will be called on the supplied Delegate Queue. + * All storage methods will be called on a single internal work queue (so the + * implementation does not need to worry about reads and writes racing). */ -@protocol MTRPersistentStorageDelegate +@protocol MTRStorage @required /** * Get the data for the given key. Returns nil if there is no data for the * key. */ -- (nullable NSData *)storageDataForKey:(NSString *)key; +- (NSData * _Nullable)storageDataForKey:(NSString *)key; /** * Set the data for the viven key to the given value. Returns YES if the key diff --git a/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.h b/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.h index ad51b815e830cc..b22ab9ccf59389 100644 --- a/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.h +++ b/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.h @@ -79,18 +79,18 @@ extern size_t const MTRSizeThreadPANID; * returned. In particular, it's expected to be a 16-bit unsigned * integer stored as 2 bytes in host order. */ -- (nullable instancetype)initWithNetworkName:(NSString *)networkName - extendedPANID:(NSData *)extendedPANID - masterKey:(NSData *)masterKey - PSKc:(NSData *)PSKc - channel:(NSNumber *)channel - panID:(NSData *)panID; +- (instancetype _Nullable)initWithNetworkName:(NSString *)networkName + extendedPANID:(NSData *)extendedPANID + masterKey:(NSData *)masterKey + PSKc:(NSData *)PSKc + channel:(NSNumber *)channel + panID:(NSData *)panID; /** * Create a Thread Operational Dataset object with a RCP formatted active operational dataset. * This initializer will return nil if the input data cannot be parsed correctly */ -- (nullable instancetype)initWithData:(NSData *)data; +- (instancetype _Nullable)initWithData:(NSData *)data; /** * Get the underlying data that represents the Thread Active Operational Dataset diff --git a/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.mm b/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.mm index ffdd19e24bd134..37eb23175966da 100644 --- a/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.mm +++ b/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.mm @@ -35,12 +35,12 @@ @interface MTRThreadOperationalDataset () @implementation MTRThreadOperationalDataset -- (nullable instancetype)initWithNetworkName:(NSString *)networkName - extendedPANID:(NSData *)extendedPANID - masterKey:(NSData *)masterKey - PSKc:(NSData *)PSKc - channel:(NSNumber *)channel - panID:(NSData *)panID +- (instancetype _Nullable)initWithNetworkName:(NSString *)networkName + extendedPANID:(NSData *)extendedPANID + masterKey:(NSData *)masterKey + PSKc:(NSData *)PSKc + channel:(NSNumber *)channel + panID:(NSData *)panID { if (self = [super init]) { _networkName = networkName; @@ -110,7 +110,7 @@ - (BOOL)_checkDataLength:(NSData *)data expectedLength:(size_t)expectedLength return YES; } -- (nullable instancetype)initWithData:(NSData *)data +- (instancetype _Nullable)initWithData:(NSData *)data { chip::ByteSpan span = chip::ByteSpan((uint8_t *) data.bytes, data.length); auto dataset = chip::Thread::OperationalDataset(); diff --git a/src/darwin/Framework/CHIP/Matter.h b/src/darwin/Framework/CHIP/Matter.h index c2040c08a882c4..975785fdd34d24 100644 --- a/src/darwin/Framework/CHIP/Matter.h +++ b/src/darwin/Framework/CHIP/Matter.h @@ -29,19 +29,19 @@ #import #import #import -#import #import #import #import #import +#import +#import #import -#import #import #import #import -#import +#import #import -#import #import +#import #import #import diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt index 17f8ef3011d16a..442bfeea23a092 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt @@ -128,7 +128,7 @@ using chip::SessionHandle; chip::Controller::{{asUpperCamelCase parent.name}}Cluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall {{~#if_is_fabric_scoped_struct type~}} - , params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue] + , params.fabricFiltered {{~/if_is_fabric_scoped_struct~}} ); }); @@ -182,14 +182,11 @@ using chip::SessionHandle; {{/if}} {{#if isReportableAttribute}} -- (void) subscribe{{>attribute}}WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params +- (void) subscribe{{>attribute}}WithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTR{{>attribute_data_callback_name}}CallbackSubscriptionBridge(self.callbackQueue, self.device, @@ -197,7 +194,7 @@ reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value not great from a type-safety perspective, of course. }} reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -206,9 +203,9 @@ reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value auto failureFn = Callback::FromCancelable(failure); chip::Controller::{{asUpperCamelCase parent.name}}Cluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTR{{>attribute_data_callback_name}}CallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue] + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTR{{>attribute_data_callback_name}}CallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params.fabricFiltered, + params.keepPreviousSubscriptions ); }, subscriptionEstablished); } diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt index b0bcbf7054baed..ab8b92c3734e36 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt @@ -18,9 +18,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseCluster{{asUpperCamelCase name}} : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; {{#chip_cluster_commands}} - (void){{asLowerCamelCase name}}WithParams:(MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params completion:({{>command_completion_type command=.}})completion; @@ -47,8 +47,7 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void) subscribe{{>attribute}}WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params +- (void) subscribe{{>attribute}}WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler; + (void) read{{>attribute}}WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion; diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters.zapt index d158b95d9d2192..07be8fe3d55287 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters.zapt @@ -20,9 +20,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRCluster{{asUpperCamelCase name}} : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; {{#chip_cluster_commands}} - (void){{asLowerCamelCase name}}WithParams:(MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion; diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt index 32fd5af6e56875..94e7ffff02b86c 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params alloc] init]; diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt index 52b05b75f23a5e..8b7e54e4db3435 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt @@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end {{/zcl_commands}} {{/zcl_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt index 2c80d9e679fa40..123517520831b2 100644 --- a/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}} alloc] init]; @@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Event alloc] init]; diff --git a/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt index f277bfd0838234..9e131db8c50d77 100644 --- a/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt @@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN {{/zcl_struct_items}} - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end {{/zcl_structs}} @@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN {{/zcl_event_fields}} - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end {{/zcl_events}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index ef3cba11672021..278e904bb85dd7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -30,9 +30,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterIdentify : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completion:(MTRStatusCompletion)completion; - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params completion:(MTRStatusCompletion)completion; @@ -46,12 +46,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeIdentifyTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeIdentifyTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -62,12 +59,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeIdentifyTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -78,12 +72,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -95,12 +87,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -112,12 +102,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -128,11 +115,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -143,12 +128,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -165,9 +147,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterGroups : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params completion:(void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completion; @@ -191,11 +173,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -206,12 +186,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -223,12 +201,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -240,12 +216,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -256,11 +229,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -271,12 +242,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -293,9 +261,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterScenes : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion; @@ -330,11 +298,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSceneCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -345,12 +311,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentSceneWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -361,12 +324,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentGroupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -377,11 +337,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSceneValidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -392,11 +350,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -407,12 +363,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLastConfiguredByWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -423,12 +376,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -440,12 +391,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -457,12 +406,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -473,11 +419,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -488,12 +432,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -510,9 +451,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterOnOff : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completion:(MTRStatusCompletion)completion; - (void)offWithCompletion:(MTRStatusCompletion)completion; @@ -531,11 +472,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -546,12 +485,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeGlobalSceneControlWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -567,11 +504,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOnTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOnTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -586,11 +521,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOffWaitTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -605,12 +538,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeStartUpOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -621,12 +551,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -638,12 +566,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -655,12 +581,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -671,11 +594,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -686,12 +607,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -708,20 +626,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterOnOffSwitchConfiguration : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -736,12 +652,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -752,12 +665,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -769,12 +680,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -786,12 +695,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -802,11 +708,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -817,12 +721,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -839,9 +740,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterLevelControl : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params completion:(MTRStatusCompletion)completion; - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MTRStatusCompletion)completion; @@ -860,12 +761,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -876,12 +774,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -892,11 +787,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -907,11 +800,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -922,12 +813,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -938,12 +826,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -954,12 +839,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -974,11 +856,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -993,12 +873,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOnOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1014,11 +892,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOnLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1033,12 +909,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOnTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1053,12 +926,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1074,12 +945,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDefaultMoveRateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDefaultMoveRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1094,12 +962,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeStartUpCurrentLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeStartUpCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1111,12 +977,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -1128,14 +992,12 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; @@ -1145,12 +1007,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1161,11 +1020,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -1176,12 +1033,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -1198,9 +1052,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterBinaryInputBasic : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; @@ -1211,11 +1065,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1230,11 +1082,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1249,12 +1099,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1269,12 +1116,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1285,11 +1129,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1304,12 +1146,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1324,11 +1163,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1339,11 +1176,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1354,12 +1189,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1370,12 +1202,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -1387,12 +1217,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -1404,12 +1232,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1420,11 +1245,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -1435,12 +1258,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -1457,21 +1277,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterDescriptor : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeDeviceTypeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDeviceTypeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDeviceTypeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1482,11 +1299,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1497,11 +1312,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1512,11 +1325,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1527,12 +1338,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -1544,12 +1353,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -1561,12 +1368,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1577,11 +1381,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -1592,12 +1394,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -1614,9 +1413,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterBinding : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; @@ -1628,11 +1427,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBindingWithParams:(MTRSubscribeParams *)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 @@ -1643,12 +1440,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -1660,12 +1455,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -1677,12 +1470,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1693,11 +1483,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -1708,12 +1496,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -1730,9 +1515,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterAccessControl : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeAclWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; @@ -1744,11 +1529,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAclWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAclWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1764,11 +1547,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1780,13 +1561,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1799,13 +1578,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1818,13 +1595,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1836,12 +1611,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -1853,12 +1626,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -1870,12 +1641,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1886,11 +1654,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -1901,12 +1667,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -1923,9 +1686,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterActions : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params completion:(MTRStatusCompletion)completion; - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params @@ -1950,11 +1713,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1965,12 +1726,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEndpointListsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1981,11 +1739,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSetupURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -1996,12 +1752,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -2013,12 +1767,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -2030,12 +1782,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2046,11 +1795,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -2061,12 +1808,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -2083,9 +1827,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterBasic : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params completion:(MTRStatusCompletion)completion; @@ -2096,12 +1840,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2113,11 +1855,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2128,11 +1868,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2143,11 +1881,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2158,11 +1894,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2177,11 +1911,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2196,11 +1928,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLocationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2211,12 +1941,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2228,12 +1955,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2245,12 +1970,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2262,12 +1984,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2279,12 +1999,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2296,11 +2014,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2311,11 +2027,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2326,12 +2040,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2342,12 +2053,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2362,12 +2070,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2379,11 +2085,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2394,11 +2098,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2410,12 +2112,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2427,12 +2127,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -2444,12 +2142,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -2461,12 +2157,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2477,11 +2170,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -2492,12 +2183,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -2514,9 +2202,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterOtaSoftwareUpdateProvider : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params completion:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, @@ -2532,12 +2220,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -2549,12 +2235,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -2566,12 +2250,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2582,11 +2263,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -2597,12 +2276,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -2619,9 +2295,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterOtaSoftwareUpdateRequestor : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params completion:(MTRStatusCompletion)completion; @@ -2636,12 +2312,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDefaultOtaProvidersWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2653,12 +2327,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2669,11 +2340,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2684,12 +2353,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2701,12 +2368,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -2718,12 +2383,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -2735,12 +2398,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2751,11 +2411,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -2766,12 +2424,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -2788,9 +2443,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterLocalizationConfiguration : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; @@ -2801,12 +2456,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2817,12 +2469,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2833,12 +2482,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -2850,12 +2497,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -2867,12 +2512,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2883,11 +2525,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -2898,12 +2538,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -2920,9 +2557,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterTimeFormatLocalization : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; @@ -2933,11 +2570,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2952,12 +2587,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2970,12 +2603,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedCalendarTypesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -2987,12 +2618,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -3004,12 +2633,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -3021,12 +2648,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3037,11 +2661,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -3052,12 +2674,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -3074,9 +2693,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterUnitLocalization : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; @@ -3087,12 +2706,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3103,12 +2719,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -3120,12 +2734,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -3137,12 +2749,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3153,11 +2762,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -3168,12 +2775,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -3190,20 +2794,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterPowerSourceConfiguration : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3214,12 +2816,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -3231,12 +2831,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -3248,12 +2846,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3264,11 +2859,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -3279,13 +2872,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; @@ -3301,20 +2891,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterPowerSource : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3325,11 +2913,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3340,11 +2926,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3356,13 +2940,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3375,13 +2956,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3393,12 +2971,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3409,12 +2984,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3426,12 +2999,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3443,12 +3014,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3460,12 +3029,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3476,12 +3042,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3492,11 +3055,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3507,12 +3068,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3524,12 +3083,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3540,12 +3096,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3556,12 +3109,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3573,12 +3124,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3590,11 +3139,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3605,12 +3152,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3622,13 +3166,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3640,12 +3181,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3657,12 +3196,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3674,12 +3211,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3691,12 +3226,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3708,11 +3241,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3723,11 +3254,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3738,12 +3267,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3754,12 +3280,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3772,13 +3296,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3790,12 +3311,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3807,12 +3326,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3824,12 +3341,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -3841,12 +3356,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -3858,12 +3371,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3874,11 +3384,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -3889,12 +3397,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -3911,9 +3416,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterGeneralCommissioning : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params completion:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, @@ -3938,11 +3443,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3954,14 +3457,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)( - MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3975,12 +3475,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -3991,12 +3488,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4009,13 +3504,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4027,12 +3520,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -4044,12 +3535,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -4061,12 +3550,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4077,11 +3563,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -4092,12 +3576,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -4114,9 +3595,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterNetworkCommissioning : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params completion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, @@ -4142,11 +3623,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4157,11 +3636,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4172,12 +3649,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4190,12 +3665,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4211,12 +3684,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4227,12 +3697,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4244,11 +3712,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4260,12 +3726,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4277,12 +3741,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -4294,12 +3756,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -4311,12 +3771,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4327,11 +3784,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -4342,12 +3797,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -4364,9 +3816,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterDiagnosticLogs : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params completion:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, @@ -4377,12 +3829,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -4394,12 +3844,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -4411,12 +3859,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4427,11 +3872,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -4442,12 +3885,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -4464,9 +3904,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterGeneralDiagnostics : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params completion:(MTRStatusCompletion)completion; @@ -4476,12 +3916,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4492,11 +3929,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4507,11 +3942,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4523,12 +3956,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4540,11 +3971,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBootReasonsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4555,12 +3984,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4572,12 +3999,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4588,12 +4012,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4606,13 +4028,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4624,12 +4043,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -4641,12 +4058,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -4658,12 +4073,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4674,11 +4086,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -4689,12 +4099,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -4711,9 +4118,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterSoftwareDiagnostics : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params completion:(MTRStatusCompletion)completion; @@ -4724,12 +4131,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4740,12 +4144,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4756,12 +4157,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4773,13 +4171,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4791,12 +4186,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -4808,12 +4201,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -4825,12 +4216,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4841,11 +4229,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -4856,12 +4242,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -4878,9 +4261,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterThreadNetworkDiagnostics : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion; @@ -4891,11 +4274,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4906,11 +4287,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4921,11 +4300,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4936,11 +4313,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4951,12 +4326,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4967,12 +4339,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4983,12 +4352,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -4999,12 +4365,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNeighborTableListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5015,12 +4378,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRouteTableListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5031,11 +4391,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5046,11 +4404,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5061,11 +4417,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5076,12 +4430,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5093,12 +4445,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5109,12 +4458,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5126,12 +4473,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5142,12 +4486,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5158,12 +4499,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5174,12 +4512,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5192,12 +4528,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5210,13 +4544,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5228,12 +4560,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5245,12 +4575,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5261,12 +4588,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5277,12 +4601,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5293,12 +4614,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5310,12 +4629,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5327,12 +4643,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5344,11 +4658,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5359,12 +4671,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5375,12 +4684,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5391,12 +4697,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5408,12 +4712,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5424,12 +4725,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5441,13 +4739,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5460,13 +4755,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5478,12 +4771,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5494,12 +4784,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5511,12 +4798,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5528,12 +4813,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5544,12 +4826,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5560,12 +4839,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5576,11 +4852,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5591,12 +4865,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5607,12 +4878,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5623,12 +4891,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5640,12 +4906,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5657,12 +4920,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5675,13 +4936,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5693,12 +4951,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5710,12 +4966,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5728,13 +4982,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5747,13 +4998,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5765,12 +5013,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5781,12 +5026,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5797,12 +5039,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5813,12 +5052,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5829,12 +5065,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5845,11 +5078,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5861,13 +5092,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5879,12 +5107,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5898,15 +5123,12 @@ NS_ASSUME_NONNULL_BEGIN * MTRSubscribeParams. */ - (void) - subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))reportHandler; + subscribeAttributeOperationalDatasetComponentsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))reportHandler; + (void) readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint @@ -5922,13 +5144,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5940,12 +5159,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -5957,12 +5174,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -5974,12 +5189,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -5990,11 +5202,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -6005,12 +5215,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -6027,9 +5234,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterWiFiNetworkDiagnostics : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion; @@ -6040,11 +5247,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBssidWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6055,12 +5260,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6071,11 +5273,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6086,12 +5286,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6102,11 +5299,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRssiWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6117,12 +5312,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6133,12 +5325,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6150,12 +5339,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6168,12 +5355,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6185,12 +5370,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6202,12 +5385,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6219,12 +5400,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6235,12 +5413,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6251,12 +5426,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -6268,12 +5441,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -6285,12 +5456,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6301,11 +5469,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -6316,12 +5482,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -6338,9 +5501,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterEthernetNetworkDiagnostics : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion; @@ -6351,11 +5514,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6366,11 +5527,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6381,12 +5540,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6397,12 +5553,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6413,11 +5566,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6428,12 +5579,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6444,12 +5592,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6460,12 +5605,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6476,12 +5618,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6492,12 +5631,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -6509,12 +5646,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -6526,12 +5661,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6542,11 +5674,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -6557,12 +5687,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -6579,20 +5706,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterBridgedDeviceBasic : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6603,11 +5728,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6618,11 +5741,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6637,11 +5758,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6652,12 +5771,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6669,12 +5785,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6686,12 +5800,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6703,12 +5814,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6720,12 +5829,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6737,11 +5844,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6752,11 +5857,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6767,12 +5870,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6783,12 +5883,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6799,11 +5896,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6814,11 +5909,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6829,12 +5922,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -6846,12 +5937,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -6863,12 +5952,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6879,11 +5965,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -6894,12 +5978,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -6916,21 +5997,19 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterSwitch : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6942,12 +6021,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6958,12 +6034,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -6974,12 +6047,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -6991,12 +6062,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -7008,12 +6077,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7024,11 +6090,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -7039,12 +6103,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -7061,9 +6122,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterAdministratorCommissioning : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params completion:(MTRStatusCompletion)completion; @@ -7078,12 +6139,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7094,12 +6152,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7110,12 +6165,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7126,12 +6178,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -7143,12 +6193,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -7160,12 +6208,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7176,11 +6221,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -7191,12 +6234,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -7213,9 +6253,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterOperationalCredentials : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, @@ -7247,11 +6287,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7263,11 +6301,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7278,12 +6314,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7294,12 +6327,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7312,13 +6343,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams *)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 @@ -7330,12 +6358,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7347,12 +6373,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -7364,12 +6388,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -7381,12 +6403,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7397,11 +6416,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -7412,12 +6429,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -7434,9 +6448,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterGroupKeyManagement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completion:(MTRStatusCompletion)completion; - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params @@ -7457,11 +6471,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7473,11 +6485,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7488,12 +6498,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7506,12 +6514,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7523,12 +6529,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -7540,12 +6544,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -7557,12 +6559,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7573,11 +6572,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -7588,12 +6585,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -7610,20 +6604,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterFixedLabel : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7634,12 +6626,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -7651,12 +6641,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -7668,12 +6656,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7684,11 +6669,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -7699,12 +6682,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -7721,9 +6701,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterUserLabel : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion; @@ -7734,11 +6714,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7749,12 +6727,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -7766,12 +6742,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -7783,12 +6757,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7799,11 +6770,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -7814,12 +6783,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -7836,20 +6802,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterBooleanState : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7860,12 +6824,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -7877,12 +6839,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -7894,12 +6854,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7910,11 +6867,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -7925,12 +6880,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -7947,9 +6899,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterModeSelect : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion; @@ -7958,11 +6910,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7973,12 +6923,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -7990,12 +6938,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8006,11 +6951,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8025,11 +6968,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8044,11 +6985,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8059,12 +6998,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -8076,12 +7013,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -8093,12 +7028,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8109,11 +7041,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -8124,12 +7054,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -8146,9 +7073,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterDoorLock : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion; - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion; @@ -8191,11 +7118,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8206,11 +7131,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8221,12 +7144,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8237,11 +7157,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8256,12 +7174,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8276,12 +7191,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8296,11 +7208,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8312,13 +7222,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8331,13 +7238,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8350,13 +7254,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8369,13 +7270,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint @@ -8389,13 +7288,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint @@ -8409,13 +7306,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8427,12 +7322,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8443,12 +7335,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8459,12 +7348,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8476,12 +7363,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8494,12 +7379,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8512,13 +7395,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8534,11 +7415,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8553,11 +7432,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8572,12 +7449,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8592,11 +7466,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8611,12 +7483,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8628,13 +7497,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8647,13 +7513,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8670,12 +7534,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8692,12 +7554,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8714,12 +7574,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8736,13 +7594,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8759,13 +7614,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8781,12 +7633,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8803,13 +7653,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8825,12 +7673,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8847,13 +7693,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8869,12 +7713,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8886,12 +7728,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -8903,12 +7743,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -8920,12 +7758,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -8936,11 +7771,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -8951,12 +7784,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -8973,9 +7803,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterWindowCovering : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params completion:(MTRStatusCompletion)completion; - (void)upOrOpenWithCompletion:(MTRStatusCompletion)completion; @@ -8997,11 +7827,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9013,13 +7841,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9032,13 +7857,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9050,12 +7872,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9067,12 +7887,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9085,12 +7903,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9103,12 +7919,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9120,12 +7934,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9137,13 +7948,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9156,13 +7965,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9174,12 +7981,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9192,13 +7997,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9211,13 +8014,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9229,12 +8030,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9246,13 +8044,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9265,13 +8061,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9284,12 +8078,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9302,13 +8094,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9321,12 +8110,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9339,13 +8126,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9361,11 +8145,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9376,12 +8158,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9392,12 +8171,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -9409,12 +8186,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -9426,12 +8201,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9442,11 +8214,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -9457,12 +8227,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -9479,9 +8246,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterBarrierControl : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params completion:(MTRStatusCompletion)completion; @@ -9494,12 +8261,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9511,12 +8276,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9528,12 +8291,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9549,12 +8310,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9570,12 +8329,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9592,13 +8349,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9615,13 +8369,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9637,12 +8388,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9658,12 +8407,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9675,12 +8422,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9691,12 +8435,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -9708,12 +8450,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -9725,12 +8465,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9741,11 +8478,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -9756,12 +8491,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -9778,20 +8510,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterPumpConfigurationAndControl : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9802,11 +8532,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9817,11 +8545,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9832,12 +8558,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9848,12 +8571,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9864,12 +8584,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9880,12 +8597,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9896,12 +8610,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9912,12 +8623,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9928,12 +8636,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9944,12 +8649,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9960,13 +8662,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +- (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; @@ -9976,12 +8675,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -9992,11 +8688,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10008,12 +8702,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10025,12 +8717,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10042,11 +8732,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10057,11 +8745,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10076,12 +8762,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10093,11 +8777,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10113,12 +8795,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10134,12 +8814,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10154,11 +8831,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10169,12 +8844,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -10186,12 +8859,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -10203,12 +8874,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10219,11 +8887,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -10234,12 +8900,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -10256,9 +8919,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterThermostat : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params completion:(MTRStatusCompletion)completion; @@ -10276,12 +8939,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10292,12 +8952,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10309,11 +8967,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10325,13 +8981,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10344,13 +8997,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10363,13 +9013,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10382,13 +9029,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10400,12 +9044,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10416,12 +9057,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10437,13 +9075,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10460,13 +9095,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10483,13 +9115,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10506,13 +9135,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10529,13 +9155,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10552,13 +9175,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10574,12 +9194,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10595,12 +9213,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10616,12 +9232,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10637,12 +9251,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams *)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 @@ -10658,12 +9270,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10679,12 +9289,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10700,13 +9307,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10722,11 +9326,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10738,12 +9340,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10755,11 +9355,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10771,13 +9369,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10790,13 +9385,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10813,13 +9405,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10837,13 +9426,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10861,14 +9448,12 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +- (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, @@ -10880,12 +9465,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10897,12 +9480,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10914,12 +9495,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10932,13 +9511,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10954,12 +9531,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10970,12 +9544,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -10987,12 +9559,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11008,12 +9578,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11025,12 +9593,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11042,12 +9608,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11063,12 +9627,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11084,11 +9646,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11103,11 +9663,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11122,12 +9680,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11143,12 +9699,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11163,11 +9716,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11182,12 +9733,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11198,12 +9746,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11219,12 +9765,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11235,12 +9778,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -11252,12 +9793,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -11269,12 +9808,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11285,11 +9821,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -11300,12 +9834,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -11322,9 +9853,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterFanControl : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; @@ -11335,11 +9866,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11354,12 +9883,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11374,12 +9900,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11390,12 +9913,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11406,11 +9926,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11425,12 +9943,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11441,12 +9956,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11457,11 +9969,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams *)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 @@ -11476,11 +9986,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams *)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 @@ -11491,11 +9999,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11510,11 +10016,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11525,12 +10029,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -11542,12 +10044,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -11559,12 +10059,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11575,11 +10072,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -11590,12 +10085,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -11612,9 +10104,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterThermostatUserInterfaceConfiguration : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion; @@ -11626,12 +10118,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11647,12 +10137,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11668,13 +10155,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11686,12 +10171,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -11703,12 +10186,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -11720,12 +10201,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11736,11 +10214,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -11751,12 +10227,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -11773,9 +10246,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterColorControl : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completion:(MTRStatusCompletion)completion; - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completion:(MTRStatusCompletion)completion; @@ -11809,11 +10282,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11824,12 +10295,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11841,12 +10310,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11857,11 +10323,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11872,11 +10336,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11887,12 +10349,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11904,12 +10364,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11921,12 +10378,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11938,11 +10393,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11957,11 +10410,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -11972,12 +10423,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams *)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 @@ -11989,11 +10438,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams *)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 @@ -12004,11 +10451,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams *)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 @@ -12019,12 +10464,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams *)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 @@ -12036,11 +10479,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams *)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 @@ -12051,11 +10492,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams *)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 @@ -12066,12 +10505,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams *)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 @@ -12083,11 +10520,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams *)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 @@ -12098,11 +10533,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams *)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 @@ -12113,12 +10546,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams *)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 @@ -12130,11 +10561,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams *)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 @@ -12145,11 +10574,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams *)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 @@ -12160,12 +10587,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams *)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 @@ -12177,11 +10602,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12192,11 +10615,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12207,12 +10628,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12224,11 +10643,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12239,11 +10656,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams *)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 @@ -12254,12 +10669,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams *)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 @@ -12275,11 +10688,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12294,11 +10705,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12313,12 +10722,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams *)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 @@ -12333,12 +10739,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12353,12 +10756,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams *)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 @@ -12374,12 +10775,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12394,12 +10792,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12414,12 +10809,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12435,12 +10828,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12455,12 +10845,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12475,12 +10862,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams *)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 @@ -12492,12 +10877,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams *)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 @@ -12509,12 +10892,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams *)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 @@ -12526,12 +10907,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams *)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 @@ -12542,12 +10920,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams *)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 @@ -12559,12 +10935,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams *)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 @@ -12576,13 +10949,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams *)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 @@ -12595,13 +10965,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams *)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 @@ -12613,12 +10980,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams *)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 @@ -12631,13 +10996,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams *)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 @@ -12650,13 +11012,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams *)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 @@ -12669,13 +11028,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12692,13 +11049,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12710,12 +11065,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -12727,12 +11080,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -12744,12 +11095,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12760,11 +11108,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -12775,12 +11121,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -12797,21 +11140,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterBallastConfiguration : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12822,12 +11162,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12838,12 +11175,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12858,11 +11192,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12877,11 +11209,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12897,12 +11227,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeIntrinsicBalanceFactorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12919,13 +11247,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12937,12 +11262,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12957,11 +11279,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12976,12 +11296,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -12996,12 +11313,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13016,12 +11330,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams *)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 @@ -13036,12 +11347,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13057,12 +11365,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13074,12 +11380,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -13091,12 +11395,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -13108,12 +11410,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13124,11 +11423,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -13139,12 +11436,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -13161,21 +11455,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterIlluminanceMeasurement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13186,12 +11477,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13202,12 +11490,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13218,11 +11503,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13233,12 +11516,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13249,12 +11529,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -13266,12 +11544,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -13283,12 +11559,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13299,11 +11572,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -13314,12 +11585,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -13336,21 +11604,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterTemperatureMeasurement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13361,12 +11626,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13377,12 +11639,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13393,11 +11652,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13408,12 +11665,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -13425,12 +11680,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -13442,12 +11695,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13458,11 +11708,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -13473,12 +11721,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -13495,21 +11740,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterPressureMeasurement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13520,12 +11762,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13536,12 +11775,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13552,11 +11788,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13567,11 +11801,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13582,12 +11814,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13598,12 +11827,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13614,12 +11840,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13630,11 +11853,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13645,12 +11866,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -13662,12 +11881,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -13679,12 +11896,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13695,11 +11909,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -13710,12 +11922,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -13732,21 +11941,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterFlowMeasurement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13757,12 +11963,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13773,12 +11976,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13789,11 +11989,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13804,12 +12002,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -13821,12 +12017,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -13838,12 +12032,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13854,11 +12045,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -13869,12 +12058,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -13891,21 +12077,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterRelativeHumidityMeasurement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13916,12 +12099,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13932,12 +12112,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13948,11 +12125,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13963,12 +12138,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -13980,12 +12153,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -13997,12 +12168,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14013,11 +12181,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -14028,12 +12194,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -14050,20 +12213,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterOccupancySensing : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14074,12 +12235,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14092,13 +12251,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14115,13 +12271,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14138,13 +12292,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14162,13 +12314,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14186,13 +12336,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14210,13 +12358,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14234,13 +12380,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14258,13 +12402,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint @@ -14283,13 +12425,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint @@ -14308,13 +12448,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) - subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint @@ -14327,12 +12465,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -14344,12 +12480,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -14361,12 +12495,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14377,11 +12508,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -14392,12 +12521,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -14414,20 +12540,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterWakeOnLan : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14438,12 +12562,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -14455,12 +12577,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -14472,12 +12592,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14488,11 +12605,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -14503,12 +12618,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -14525,9 +12637,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterChannel : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, @@ -14541,11 +12653,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14557,12 +12667,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14575,12 +12683,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14592,12 +12698,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -14609,12 +12713,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -14626,12 +12728,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14642,11 +12741,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -14657,12 +12754,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -14679,9 +12773,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterTargetNavigator : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params completion:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, @@ -14692,11 +12786,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14707,12 +12799,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14723,12 +12812,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -14740,13 +12827,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 completion: @@ -14757,12 +12842,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14773,11 +12855,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -14788,12 +12868,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -14810,9 +12887,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterMediaPlayback : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params completion: @@ -14869,12 +12946,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14885,11 +12959,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14900,11 +12972,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14916,12 +12986,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14933,12 +13001,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14949,12 +13014,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14965,12 +13027,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -14981,12 +13040,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -14998,12 +13055,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15015,12 +13070,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15031,11 +13083,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -15046,12 +13096,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -15068,9 +13115,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterMediaInput : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completion:(MTRStatusCompletion)completion; - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params @@ -15086,11 +13133,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15101,12 +13146,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15117,12 +13159,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15134,12 +13174,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15151,12 +13189,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15167,11 +13202,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -15182,12 +13215,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -15204,9 +13234,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterLowPower : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completion:(MTRStatusCompletion)completion; - (void)sleepWithCompletion:(MTRStatusCompletion)completion; @@ -15216,12 +13246,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15233,12 +13261,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15250,12 +13276,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15266,11 +13289,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -15281,12 +13302,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -15303,9 +13321,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterKeypadInput : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completion: @@ -15316,12 +13334,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15333,12 +13349,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15350,12 +13364,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15366,11 +13377,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -15381,12 +13390,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -15403,9 +13409,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterContentLauncher : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params completion:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, @@ -15419,11 +13425,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15439,13 +13443,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15457,12 +13458,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15474,12 +13473,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15491,12 +13488,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15507,11 +13501,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -15522,12 +13514,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -15544,9 +13533,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterAudioOutput : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completion:(MTRStatusCompletion)completion; - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completion:(MTRStatusCompletion)completion; @@ -15556,11 +13545,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15571,12 +13558,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15587,12 +13571,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15604,12 +13586,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15621,12 +13601,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15637,11 +13614,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -15652,12 +13627,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -15674,9 +13646,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterApplicationLauncher : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, @@ -15693,11 +13665,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15714,12 +13684,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15731,12 +13699,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15748,12 +13714,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15765,12 +13729,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15781,11 +13742,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -15796,12 +13755,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -15818,20 +13774,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterApplicationBasic : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15842,11 +13796,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15857,12 +13809,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15873,11 +13822,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15889,13 +13836,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15908,11 +13852,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15923,12 +13865,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15940,12 +13880,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -15956,12 +13893,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15973,12 +13908,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -15990,12 +13923,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16006,11 +13936,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -16021,12 +13949,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -16043,9 +13968,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterAccountLogin : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, @@ -16059,12 +13984,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -16076,12 +13999,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -16093,12 +14014,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16109,11 +14027,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -16124,12 +14040,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -16146,9 +14059,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterElectricalMeasurement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params completion:(MTRStatusCompletion)completion; @@ -16161,12 +14074,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16177,11 +14087,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16192,12 +14100,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16208,12 +14113,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16224,11 +14126,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16239,12 +14139,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16255,12 +14152,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16271,11 +14165,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16286,11 +14178,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16301,11 +14191,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16316,12 +14204,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16333,12 +14219,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16349,12 +14232,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16366,12 +14247,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16382,12 +14260,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16399,12 +14275,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16415,11 +14288,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16430,12 +14301,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16446,12 +14314,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16462,12 +14327,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16478,12 +14340,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16494,12 +14353,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16511,12 +14368,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16529,13 +14384,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16548,13 +14400,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16567,13 +14416,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16586,13 +14432,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16605,13 +14448,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16624,13 +14464,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16643,13 +14480,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16662,13 +14497,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16681,13 +14514,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16700,13 +14531,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16719,13 +14548,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16738,13 +14565,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16757,12 +14582,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16774,12 +14597,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16791,12 +14612,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16807,12 +14625,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16824,13 +14639,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16843,13 +14655,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16861,12 +14671,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16879,13 +14687,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16898,13 +14703,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16917,13 +14719,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16935,12 +14735,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16952,11 +14750,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16967,12 +14763,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16983,12 +14776,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -16999,11 +14789,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17014,12 +14802,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17030,12 +14815,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17046,11 +14828,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17061,12 +14841,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17077,12 +14854,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17093,12 +14867,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17109,12 +14880,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17125,11 +14893,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17146,13 +14912,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17169,13 +14933,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17192,13 +14954,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17215,13 +14974,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17237,12 +14994,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17259,12 +15014,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17276,12 +15029,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17293,12 +15044,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17309,12 +15057,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17326,12 +15072,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17342,12 +15085,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17359,12 +15100,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17379,12 +15117,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17396,12 +15132,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17412,12 +15145,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17432,12 +15162,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17449,12 +15177,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17466,12 +15192,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17484,12 +15208,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17502,13 +15224,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17521,12 +15240,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17539,12 +15256,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17557,12 +15272,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17575,12 +15288,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17592,12 +15303,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17608,12 +15316,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17624,12 +15329,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17641,12 +15344,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17659,12 +15360,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17676,12 +15375,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17692,12 +15388,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17709,12 +15403,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17726,12 +15418,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17742,12 +15431,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17759,12 +15446,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17776,12 +15461,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17793,12 +15476,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17810,12 +15491,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17827,12 +15506,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17844,12 +15521,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17861,12 +15536,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17879,13 +15552,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint @@ -17899,13 +15570,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17918,13 +15587,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17937,13 +15604,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17956,13 +15621,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17975,13 +15638,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -17994,13 +15654,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18012,12 +15669,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18029,12 +15684,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18047,12 +15700,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18064,12 +15715,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18080,12 +15728,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18097,12 +15743,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18114,12 +15758,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18130,12 +15771,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18147,12 +15786,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18164,12 +15801,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18181,12 +15816,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18198,12 +15831,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18215,12 +15846,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18232,12 +15861,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18249,12 +15876,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18267,13 +15892,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint @@ -18287,13 +15910,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18306,13 +15927,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18325,13 +15944,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18344,13 +15961,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18363,13 +15978,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18382,13 +15994,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18400,12 +16009,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -18417,12 +16024,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -18434,12 +16039,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18450,11 +16052,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -18465,12 +16065,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 @@ -18487,9 +16084,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBaseClusterTestCluster : MTRCluster -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params completion:(MTRStatusCompletion)completion; - (void)testWithCompletion:(MTRStatusCompletion)completion; @@ -18574,11 +16171,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBooleanWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18593,11 +16188,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBitmap8WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18612,11 +16205,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBitmap16WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18631,11 +16222,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBitmap32WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18650,11 +16239,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeBitmap64WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18669,11 +16256,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt8uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18688,11 +16273,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt16uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18707,11 +16290,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt24uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18726,11 +16307,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt32uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18745,11 +16324,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt40uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18764,11 +16341,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt48uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18783,11 +16358,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt56uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18802,11 +16375,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt64uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18821,11 +16392,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt8sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18840,11 +16409,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt16sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18859,11 +16426,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt24sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18878,11 +16443,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt32sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18897,11 +16460,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt40sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18916,11 +16477,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt48sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18935,11 +16494,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt56sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18954,11 +16511,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeInt64sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18973,11 +16528,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEnum8WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -18992,11 +16545,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEnum16WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19011,11 +16562,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFloatSingleWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19030,11 +16579,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFloatDoubleWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19049,11 +16596,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeOctetStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19068,11 +16613,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeListInt8uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeListInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19087,12 +16630,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeListOctetStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeListOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19107,12 +16647,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListStructOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeListStructOctetStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeListStructOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19128,12 +16666,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLongOctetStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19148,11 +16683,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeCharStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19167,12 +16700,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLongCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeLongCharStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeLongCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19187,11 +16717,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEpochUsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEpochUsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEpochUsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19206,11 +16734,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEpochSWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEpochSWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEpochSWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19225,11 +16751,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeVendorIdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19245,13 +16769,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListNullablesAndOptionalsStructWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeListNullablesAndOptionalsStructWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19267,11 +16789,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeEnumAttrWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19288,12 +16808,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStructAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19309,12 +16827,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRangeRestrictedInt8uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19330,12 +16846,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRangeRestrictedInt8sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19352,12 +16866,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRangeRestrictedInt16uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19374,12 +16886,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeRangeRestrictedInt16sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19395,12 +16905,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeListLongOctetStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeListLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19417,12 +16925,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListFabricScopedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeListFabricScopedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeListFabricScopedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19437,12 +16942,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTimedWriteBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeTimedWriteBooleanWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeTimedWriteBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19458,12 +16961,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneralErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneralErrorBooleanWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeGeneralErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19479,12 +16980,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterErrorBooleanWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeClusterErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19500,11 +16999,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUnsupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeUnsupportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeUnsupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19519,12 +17016,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableBooleanWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19539,12 +17033,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableBitmap8WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19559,12 +17050,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableBitmap16WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19579,12 +17067,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableBitmap32WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19599,12 +17084,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableBitmap64WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19619,12 +17101,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt8uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19639,12 +17118,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt16uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19659,12 +17135,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt24uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19679,12 +17152,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt32uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19699,12 +17169,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt40uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19719,12 +17186,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt48uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19739,12 +17203,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19759,12 +17220,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19779,12 +17237,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt8sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19799,12 +17254,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt16sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19819,12 +17271,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt24sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19839,12 +17288,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt32sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19859,12 +17305,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt40sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19879,12 +17322,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt48sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19899,12 +17339,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt56sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19919,12 +17356,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableInt64sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19939,12 +17373,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableEnum8WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19959,12 +17390,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableEnum16WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -19979,12 +17407,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableFloatSingleWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -20000,12 +17426,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableFloatDoubleWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -20021,12 +17445,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableOctetStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -20042,12 +17464,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableCharStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -20063,12 +17483,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableEnumAttrWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeNullableEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -20085,12 +17502,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableStructWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -20107,13 +17522,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableRangeRestrictedInt8uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -20130,13 +17543,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableRangeRestrictedInt8sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -20153,13 +17564,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableRangeRestrictedInt16uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -20176,13 +17585,11 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeNullableRangeRestrictedInt16sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; + (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -20194,12 +17601,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)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 @@ -20211,12 +17616,10 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)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 @@ -20228,12 +17631,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -20244,11 +17644,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)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 @@ -20259,12 +17657,9 @@ NS_ASSUME_NONNULL_BEGIN * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)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 diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 774474cecb3dd5..4db58b7f327439 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -159,20 +159,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeIdentifyTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -182,10 +178,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -226,20 +221,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -249,10 +240,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -293,21 +283,17 @@ new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -317,10 +303,9 @@ new MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -363,21 +348,17 @@ new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -387,10 +368,9 @@ new MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -432,20 +412,16 @@ new MTRIdentifyAttributeListListAttributeCallbackBridge(self.callbackQueue, self }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -455,10 +431,9 @@ new MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -499,20 +474,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -522,10 +493,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -566,21 +536,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -590,10 +555,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -832,20 +796,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -855,10 +815,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -899,21 +858,17 @@ new MTRGroupsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -923,10 +878,9 @@ new MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -968,21 +922,17 @@ new MTRGroupsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -992,10 +942,9 @@ new MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -1037,20 +986,16 @@ new MTRGroupsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1060,10 +1005,9 @@ new MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -1104,20 +1048,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1127,10 +1067,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -1171,21 +1110,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1195,10 +1129,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -1677,20 +1610,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1700,10 +1629,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -1744,20 +1672,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1767,10 +1691,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -1811,20 +1734,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1834,10 +1753,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -1878,20 +1796,16 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1901,10 +1815,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -1945,20 +1858,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1968,10 +1877,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -2012,21 +1920,16 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2036,10 +1939,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -2080,21 +1982,17 @@ new MTRScenesGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2104,10 +2002,9 @@ new MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -2149,21 +2046,17 @@ new MTRScenesAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2173,10 +2066,9 @@ new MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -2218,20 +2110,16 @@ new MTRScenesAttributeListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRScenesAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2241,10 +2129,9 @@ new MTRScenesAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -2285,20 +2172,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2308,10 +2191,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -2352,21 +2234,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2376,10 +2253,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -2617,20 +2493,16 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2640,10 +2512,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -2684,21 +2555,17 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2708,10 +2575,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -2791,20 +2657,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2814,10 +2676,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -2896,20 +2757,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2919,10 +2776,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -3006,20 +2862,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3029,10 +2881,9 @@ new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -3074,21 +2925,17 @@ new MTROnOffGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3098,10 +2945,9 @@ new MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -3143,21 +2989,17 @@ new MTROnOffAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3167,10 +3009,9 @@ new MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -3212,20 +3053,16 @@ new MTROnOffAttributeListListAttributeCallbackBridge(self.callbackQueue, self.de }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROnOffAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3235,10 +3072,9 @@ new MTROnOffAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -3279,20 +3115,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3302,10 +3134,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -3346,21 +3177,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3370,10 +3196,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -3431,20 +3256,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3454,10 +3275,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -3536,21 +3356,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3560,10 +3375,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -3604,21 +3418,17 @@ new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(s }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3628,10 +3438,9 @@ new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscrip chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -3675,21 +3484,17 @@ new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(se }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3699,10 +3504,9 @@ new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscript chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -3746,20 +3550,16 @@ new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3769,10 +3569,9 @@ new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBri chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -3814,20 +3613,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3837,10 +3632,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -3881,21 +3675,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3905,10 +3694,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -4263,20 +4051,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4286,10 +4070,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -4330,21 +4113,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4354,10 +4132,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -4398,20 +4175,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4421,10 +4194,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -4465,20 +4237,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4488,10 +4256,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -4532,21 +4299,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4556,10 +4318,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -4600,20 +4361,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4623,10 +4380,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -4667,20 +4423,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4690,10 +4442,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -4772,20 +4523,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4795,10 +4542,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -4877,21 +4623,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4901,10 +4643,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -4989,20 +4730,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5012,10 +4749,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -5099,21 +4835,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5123,10 +4854,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -5210,21 +4940,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5234,10 +4959,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -5321,21 +5045,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDefaultMoveRateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5345,10 +5064,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -5432,21 +5150,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartUpCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5456,10 +5170,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -5501,21 +5214,17 @@ new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5525,10 +5234,9 @@ new MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -5571,21 +5279,17 @@ new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5595,10 +5299,9 @@ new MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -5641,20 +5344,16 @@ new MTRLevelControlAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5664,10 +5363,9 @@ new MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -5708,20 +5406,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5731,10 +5425,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -5775,21 +5468,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5799,10 +5487,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -5898,20 +5585,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5921,10 +5604,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -6003,20 +5685,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6026,10 +5704,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -6108,20 +5785,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6131,10 +5804,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -6213,20 +5885,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6236,10 +5904,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -6280,20 +5947,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6303,10 +5966,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -6385,20 +6047,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6408,10 +6066,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -6490,20 +6147,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6513,10 +6166,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -6557,20 +6209,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6580,10 +6228,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -6624,21 +6271,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6648,10 +6290,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -6692,21 +6333,17 @@ new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(self.call }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6716,10 +6353,9 @@ new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBrid chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -6762,21 +6398,17 @@ new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6786,10 +6418,9 @@ new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -6832,20 +6463,16 @@ new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6855,10 +6482,9 @@ new MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -6900,20 +6526,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6923,10 +6545,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -6967,21 +6588,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6991,10 +6607,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -7052,21 +6667,16 @@ new MTRDescriptorDeviceTypeListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeDeviceTypeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7076,10 +6686,9 @@ new MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -7120,20 +6729,16 @@ new MTRDescriptorServerListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDescriptorServerListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7143,10 +6748,9 @@ new MTRDescriptorServerListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -7187,20 +6791,16 @@ new MTRDescriptorClientListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDescriptorClientListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7210,10 +6810,9 @@ new MTRDescriptorClientListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -7254,20 +6853,16 @@ new MTRDescriptorPartsListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7277,10 +6872,9 @@ new MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -7321,21 +6915,17 @@ new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7345,10 +6935,9 @@ new MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -7391,21 +6980,17 @@ new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7415,10 +7000,9 @@ new MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -7461,20 +7045,16 @@ new MTRDescriptorAttributeListListAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7484,10 +7064,9 @@ new MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -7528,20 +7107,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7551,10 +7126,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -7595,21 +7169,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7619,10 +7188,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -7678,8 +7246,8 @@ new MTRBindingBindingListAttributeCallbackBridge(self.callbackQueue, self.device auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + return cppCluster.ReadAttribute( + successFn->mContext, successFn->mCall, failureFn->mCall, params.fabricFiltered); }); } @@ -7758,20 +7326,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBindingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBindingBindingListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7781,10 +7345,9 @@ new MTRBindingBindingListAttributeCallbackSubscriptionBridge( chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -7825,21 +7388,17 @@ new MTRBindingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7849,10 +7408,9 @@ new MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -7894,21 +7452,17 @@ new MTRBindingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7918,10 +7472,9 @@ new MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -7963,20 +7516,16 @@ new MTRBindingAttributeListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBindingAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7986,10 +7535,9 @@ new MTRBindingAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -8030,20 +7578,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8053,10 +7597,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -8097,21 +7640,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8121,10 +7659,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -8180,8 +7717,8 @@ new MTRAccessControlAclListAttributeCallbackBridge(self.callbackQueue, self.devi auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + return cppCluster.ReadAttribute( + successFn->mContext, successFn->mCall, failureFn->mCall, params.fabricFiltered); }); } @@ -8321,20 +7858,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAclWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAccessControlAclListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8344,10 +7877,9 @@ new MTRAccessControlAclListAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRAccessControlAclListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRAccessControlAclListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -8386,8 +7918,8 @@ new MTRAccessControlExtensionListAttributeCallbackBridge(self.callbackQueue, sel auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + return cppCluster.ReadAttribute( + successFn->mContext, successFn->mCall, failureFn->mCall, params.fabricFiltered); }); } @@ -8451,20 +7983,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8474,10 +8002,9 @@ new MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -8519,22 +8046,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8544,10 +8067,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -8590,22 +8112,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8615,10 +8133,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -8661,22 +8178,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8686,10 +8199,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -8731,21 +8243,17 @@ new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8755,10 +8263,9 @@ new MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -8801,21 +8308,17 @@ new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8825,10 +8328,9 @@ new MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -8871,20 +8373,16 @@ new MTRAccessControlAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8894,10 +8392,9 @@ new MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -8938,20 +8435,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8961,10 +8454,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -9005,21 +8497,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9029,10 +8516,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -9472,20 +8958,16 @@ new MTRActionsActionListListAttributeCallbackBridge(self.callbackQueue, self.dev }); } -- (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRActionsActionListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9495,10 +8977,9 @@ new MTRActionsActionListListAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -9539,20 +9020,16 @@ new MTRActionsEndpointListsListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9562,10 +9039,9 @@ new MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -9606,20 +9082,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9629,10 +9101,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -9673,21 +9144,17 @@ new MTRActionsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9697,10 +9164,9 @@ new MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -9742,21 +9208,17 @@ new MTRActionsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9766,10 +9228,9 @@ new MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -9811,20 +9272,16 @@ new MTRActionsAttributeListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRActionsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9834,10 +9291,9 @@ new MTRActionsAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -9878,20 +9334,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9901,10 +9353,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -9945,21 +9396,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9969,10 +9415,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -10061,21 +9506,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10085,10 +9525,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -10129,20 +9568,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10152,10 +9587,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -10196,20 +9630,16 @@ new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completi }); } -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10219,10 +9649,9 @@ new MTRVendorIdAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -10263,20 +9692,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10286,10 +9711,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -10330,20 +9754,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10353,10 +9773,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -10435,20 +9854,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10458,10 +9873,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -10540,20 +9954,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLocationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10563,10 +9973,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -10607,21 +10016,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10631,10 +10035,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -10675,21 +10078,17 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10699,10 +10098,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -10744,21 +10142,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10768,10 +10161,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -10812,21 +10204,17 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10836,10 +10224,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -10881,21 +10268,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10905,10 +10287,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -10949,20 +10330,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10972,10 +10349,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -11016,20 +10392,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11039,10 +10411,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -11083,20 +10454,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11106,10 +10473,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -11150,20 +10516,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11173,10 +10535,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -11255,21 +10616,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11279,10 +10636,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -11324,20 +10680,16 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11347,10 +10699,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -11391,20 +10742,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11414,10 +10761,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -11459,21 +10805,17 @@ new MTRBasicCapabilityMinimaStructAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11483,10 +10825,9 @@ new MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -11528,21 +10869,17 @@ new MTRBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11552,10 +10889,9 @@ new MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -11597,21 +10933,17 @@ new MTRBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11621,10 +10953,9 @@ new MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -11666,20 +10997,16 @@ new MTRBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.de }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11689,10 +11016,9 @@ new MTRBasicAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -11733,20 +11059,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11756,10 +11078,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -11800,21 +11121,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11824,10 +11140,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -12006,21 +11321,17 @@ new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12030,10 +11341,9 @@ new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscri chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -12077,21 +11387,17 @@ new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(s }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12101,10 +11407,9 @@ new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscrip chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -12148,20 +11453,16 @@ new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12171,10 +11472,9 @@ new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBr chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -12216,20 +11516,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12239,10 +11535,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -12283,21 +11578,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12307,10 +11597,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -12402,8 +11691,8 @@ new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge( auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + return cppCluster.ReadAttribute( + successFn->mContext, successFn->mCall, failureFn->mCall, params.fabricFiltered); }); } @@ -12468,21 +11757,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDefaultOtaProvidersWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12492,10 +11777,9 @@ new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscri chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -12539,21 +11823,16 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12563,10 +11842,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -12608,20 +11886,16 @@ new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridg }); } -- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12632,11 +11906,10 @@ new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubsc chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -12679,21 +11952,17 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12703,10 +11972,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -12748,21 +12016,17 @@ new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12772,10 +12036,9 @@ new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscr chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -12819,21 +12082,17 @@ new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12843,10 +12102,9 @@ new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscri chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -12890,20 +12148,16 @@ new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12913,10 +12167,9 @@ new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionB chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -12958,20 +12211,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12981,10 +12230,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -13025,21 +12273,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13049,10 +12292,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -13148,20 +12390,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13171,10 +12409,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -13215,21 +12452,16 @@ new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13239,10 +12471,9 @@ new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptio chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -13284,21 +12515,17 @@ new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13308,10 +12535,9 @@ new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscri chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -13355,21 +12581,17 @@ new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(s }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13379,10 +12601,9 @@ new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscrip chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -13426,20 +12647,16 @@ new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13449,10 +12666,9 @@ new MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBr chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -13494,20 +12710,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13517,10 +12729,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -13561,21 +12772,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13585,10 +12791,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -13684,20 +12889,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13707,10 +12908,9 @@ new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridg chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -13790,21 +12990,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13814,10 +13010,9 @@ new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBri chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -13860,21 +13055,17 @@ new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(s }); } -- (void)subscribeAttributeSupportedCalendarTypesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13884,10 +13075,9 @@ new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscrip chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -13931,21 +13121,17 @@ new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(sel }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13955,10 +13141,9 @@ new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscripti chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14001,21 +13186,17 @@ new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14025,10 +13206,9 @@ new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptio chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14071,20 +13251,16 @@ new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14094,10 +13270,9 @@ new MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridg chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14139,20 +13314,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14162,10 +13333,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14206,21 +13376,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14230,10 +13395,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14329,21 +13493,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14353,10 +13512,9 @@ new MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14397,21 +13555,17 @@ new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(self.call }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14421,10 +13575,9 @@ new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBrid chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14467,21 +13620,17 @@ new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14491,10 +13640,9 @@ new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14537,20 +13685,16 @@ new MTRUnitLocalizationAttributeListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14560,10 +13704,9 @@ new MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14605,20 +13748,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14628,10 +13767,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14672,21 +13810,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14696,10 +13829,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14757,20 +13889,16 @@ new MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14780,10 +13908,9 @@ new MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14825,21 +13952,17 @@ new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(s }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14849,10 +13972,9 @@ new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscrip chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14896,21 +14018,17 @@ new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(se }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14920,10 +14038,9 @@ new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscript chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -14967,20 +14084,16 @@ new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14990,10 +14103,9 @@ new MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBri chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15035,20 +14147,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15058,10 +14166,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15102,21 +14209,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15126,10 +14228,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15187,20 +14288,16 @@ new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15210,10 +14307,9 @@ new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15255,20 +14351,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15278,10 +14370,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15322,20 +14413,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15345,10 +14432,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15390,22 +14476,17 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15415,10 +14496,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15461,22 +14541,17 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15486,10 +14561,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15531,21 +14605,16 @@ new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15555,10 +14624,9 @@ new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15600,21 +14668,17 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15624,10 +14688,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15669,21 +14732,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15693,10 +14752,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15738,21 +14796,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15762,10 +14816,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15807,20 +14860,16 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15830,10 +14879,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15874,21 +14922,16 @@ new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15898,10 +14941,9 @@ new MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -15943,20 +14985,16 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15966,10 +15004,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16010,21 +15047,17 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16034,10 +15067,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16079,21 +15111,16 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16103,10 +15130,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16147,21 +15173,16 @@ new MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16171,10 +15192,9 @@ new MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16216,21 +15236,17 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16240,10 +15256,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16285,21 +15300,16 @@ new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16309,10 +15319,9 @@ new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16354,20 +15363,16 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16377,10 +15382,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16421,21 +15425,16 @@ new MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - 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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16445,10 +15444,9 @@ new MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16490,22 +15488,17 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16515,10 +15508,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16560,21 +15552,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeBatCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16584,10 +15572,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16629,21 +15616,17 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16653,10 +15636,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16698,21 +15680,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16722,10 +15699,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16766,21 +15742,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16790,10 +15762,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16835,20 +15806,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16858,10 +15825,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16902,20 +15868,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeBatQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16925,10 +15887,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -16969,21 +15930,16 @@ new MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16993,10 +15949,9 @@ new MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -17038,21 +15993,17 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17062,10 +16013,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -17108,22 +16058,17 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17133,10 +16078,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -17178,21 +16122,17 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17202,10 +16142,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -17247,21 +16186,17 @@ new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17271,10 +16206,9 @@ new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -17317,21 +16251,17 @@ new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17341,10 +16271,9 @@ new MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -17387,21 +16316,17 @@ new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17411,10 +16336,9 @@ new MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -17457,20 +16381,16 @@ new MTRPowerSourceAttributeListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17480,10 +16400,9 @@ new MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -17524,20 +16443,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17547,10 +16462,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -17591,21 +16505,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17615,10 +16524,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -17800,20 +16708,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17823,10 +16727,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -17868,23 +16771,18 @@ new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(s }); } -- (void)subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)( - MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17894,10 +16792,9 @@ new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscrip chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -17943,21 +16840,16 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( }); } -- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17967,10 +16859,9 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscri chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -18013,21 +16904,17 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( }); } -- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18037,10 +16924,9 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscri chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -18085,22 +16971,18 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18110,10 +16992,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -18155,21 +17036,17 @@ new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18179,10 +17056,9 @@ new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscription chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -18225,21 +17101,17 @@ new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18249,10 +17121,9 @@ new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionB chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -18295,20 +17166,16 @@ new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18318,10 +17185,9 @@ new MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -18363,20 +17229,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18386,10 +17248,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -18430,21 +17291,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18454,10 +17310,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -18701,20 +17556,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18724,10 +17575,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -18768,20 +17618,16 @@ new MTRNetworkCommissioningNetworksListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18791,10 +17637,9 @@ new MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -18836,21 +17681,17 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18860,10 +17701,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -18905,21 +17745,17 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18929,10 +17765,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19012,21 +17847,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19036,10 +17866,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19082,21 +17911,17 @@ new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCal }); } -- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19107,11 +17932,10 @@ new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCal chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19156,20 +17980,16 @@ new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19179,10 +17999,9 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19223,21 +18042,17 @@ new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19247,10 +18062,9 @@ new MTRNullableInt32sAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19292,21 +18106,17 @@ new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19316,10 +18126,9 @@ new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscription chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19362,21 +18171,17 @@ new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19386,10 +18191,9 @@ new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionB chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19432,20 +18236,16 @@ new MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19455,10 +18255,9 @@ new MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19500,20 +18299,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19523,10 +18318,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19567,21 +18361,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19591,10 +18380,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19680,21 +18468,17 @@ new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19704,10 +18488,9 @@ new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19750,21 +18533,17 @@ new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19774,10 +18553,9 @@ new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19820,20 +18598,16 @@ new MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19843,10 +18617,9 @@ new MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19887,20 +18660,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19910,10 +18679,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -19954,21 +18722,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19978,10 +18741,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20068,21 +18830,16 @@ new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20092,10 +18849,9 @@ new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridg chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20137,20 +18893,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20160,10 +18912,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20204,20 +18955,16 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20227,10 +18974,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20271,21 +19017,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20295,10 +19037,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20340,20 +19081,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBootReasonsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20363,10 +19100,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20407,21 +19143,17 @@ new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20431,10 +19163,9 @@ new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBr chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20477,21 +19208,16 @@ new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20501,10 +19227,9 @@ new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridg chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20546,21 +19271,17 @@ new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20570,10 +19291,9 @@ new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBri chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20617,22 +19337,17 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20642,10 +19357,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20687,21 +19401,17 @@ new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20711,10 +19421,9 @@ new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBr chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20757,21 +19466,17 @@ new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20781,10 +19486,9 @@ new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBri chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20827,20 +19531,16 @@ new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20850,10 +19550,9 @@ new MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20895,20 +19594,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20918,10 +19613,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -20962,21 +19656,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20986,10 +19675,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -21078,20 +19766,16 @@ new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21101,10 +19785,9 @@ new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -21146,21 +19829,16 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21170,10 +19848,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -21214,21 +19891,16 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21238,10 +19910,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -21283,22 +19954,17 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21308,10 +19974,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -21353,21 +20018,17 @@ new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21377,10 +20038,9 @@ new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionB chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -21423,21 +20083,17 @@ new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21447,10 +20103,9 @@ new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBr chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -21493,20 +20148,16 @@ new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21516,10 +20167,9 @@ new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -21561,20 +20211,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21584,10 +20230,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -21628,21 +20273,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21652,10 +20292,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -21744,20 +20383,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21767,10 +20402,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -21811,20 +20445,16 @@ new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge }); } -- (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21834,10 +20464,9 @@ new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscr chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -21880,20 +20509,16 @@ new MTRNullableCharStringAttributeCallbackBridge(self.callbackQueue, self.device }); } -- (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21903,10 +20528,9 @@ new MTRNullableCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -21947,20 +20571,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21970,10 +20590,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22014,21 +20633,16 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22038,10 +20652,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22082,21 +20695,16 @@ new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22106,10 +20714,9 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22150,20 +20757,16 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22173,10 +20776,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22217,21 +20819,16 @@ new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNeighborTableListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22241,10 +20838,9 @@ new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptio chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22286,21 +20882,16 @@ new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRouteTableListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22310,10 +20901,9 @@ new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBr chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22355,20 +20945,16 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - 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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22378,10 +20964,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22422,20 +21007,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22445,10 +21026,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22489,20 +21069,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - 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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22512,10 +21088,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22556,21 +21131,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - 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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22580,10 +21150,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22624,21 +21193,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22648,10 +21212,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22692,21 +21255,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22716,10 +21274,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22760,21 +21317,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22784,10 +21336,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22828,21 +21379,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22852,10 +21398,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22896,21 +21441,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22920,10 +21460,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -22964,21 +21503,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22988,10 +21523,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23034,21 +21568,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23058,10 +21588,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23104,22 +21633,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23129,10 +21654,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23174,21 +21698,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23198,10 +21717,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23242,20 +21760,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23265,10 +21779,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23309,21 +21822,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23333,10 +21841,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23377,21 +21884,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23401,10 +21903,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23445,21 +21946,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23469,10 +21966,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23514,20 +22010,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23537,10 +22029,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23581,21 +22072,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23605,10 +22092,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23650,20 +22136,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23673,10 +22155,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23717,21 +22198,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23741,10 +22217,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23785,21 +22260,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23809,10 +22279,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23853,21 +22322,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23877,10 +22342,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23922,20 +22386,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23945,10 +22405,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -23989,20 +22448,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24012,10 +22467,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24057,22 +22511,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24082,10 +22531,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24128,22 +22576,18 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24153,10 +22597,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24198,21 +22641,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24222,10 +22660,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24266,21 +22703,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24290,10 +22722,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24334,21 +22765,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24358,10 +22785,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24403,20 +22829,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24426,10 +22848,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24470,21 +22891,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24494,10 +22910,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24538,21 +22953,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24562,10 +22972,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24606,20 +23015,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24629,10 +23034,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24673,21 +23077,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24697,10 +23096,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24741,21 +23139,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24765,10 +23158,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24809,21 +23201,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24833,10 +23221,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24878,20 +23265,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24901,10 +23284,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -24946,21 +23328,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24970,10 +23348,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25016,22 +23393,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25041,10 +23413,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25086,21 +23457,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25110,10 +23476,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25154,21 +23519,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25178,10 +23538,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25223,22 +23582,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25248,10 +23602,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25294,22 +23647,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25319,10 +23667,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25364,21 +23711,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25388,10 +23730,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25432,21 +23773,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25456,10 +23792,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25500,21 +23835,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25524,10 +23854,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25568,21 +23897,16 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25592,10 +23916,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25636,21 +23959,16 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25660,10 +23978,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25704,20 +24021,16 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25727,10 +24040,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25772,22 +24084,17 @@ new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25797,10 +24104,9 @@ new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscription chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25843,21 +24149,16 @@ new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)subscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25867,10 +24168,9 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25916,24 +24216,19 @@ new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallba } - (void) - subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))reportHandler + subscribeAttributeOperationalDatasetComponentsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25944,11 +24239,10 @@ new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallba chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -25998,22 +24292,17 @@ new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridg }); } -- (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26024,11 +24313,10 @@ new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubsc chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -26072,21 +24360,17 @@ new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(s }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26096,10 +24380,9 @@ new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscrip chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -26143,21 +24426,17 @@ new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(se }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26167,10 +24446,9 @@ new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscript chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -26214,20 +24492,16 @@ new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26237,10 +24511,9 @@ new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBri chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -26282,20 +24555,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26305,10 +24574,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -26349,21 +24617,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26373,10 +24636,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -26465,20 +24727,16 @@ new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBssidWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26488,10 +24746,9 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -26532,20 +24789,16 @@ new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge( }); } -- (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26555,10 +24808,9 @@ new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscri chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -26602,20 +24854,16 @@ new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBrid }); } -- (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26626,11 +24874,10 @@ new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubs chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -26673,21 +24920,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26697,10 +24939,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -26741,20 +24982,16 @@ new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26764,10 +25001,9 @@ new MTRNullableInt8sAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -26808,21 +25044,16 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26832,10 +25063,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -26876,21 +25106,16 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26900,10 +25125,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -26945,21 +25169,17 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26969,10 +25189,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27015,21 +25234,17 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27039,10 +25254,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27084,21 +25298,17 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27108,10 +25318,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27153,21 +25362,17 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27177,10 +25382,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27222,21 +25426,16 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27246,10 +25445,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27290,20 +25488,16 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27313,10 +25507,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27357,21 +25550,17 @@ new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(sel }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27381,10 +25570,9 @@ new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscripti chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27427,21 +25615,17 @@ new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27451,10 +25635,9 @@ new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptio chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27497,20 +25680,16 @@ new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27520,10 +25699,9 @@ new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridg chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27565,20 +25743,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27588,10 +25762,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27632,21 +25805,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27656,10 +25824,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27749,20 +25916,16 @@ new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBrid }); } -- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27773,11 +25936,10 @@ new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubs chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27820,20 +25982,16 @@ new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, c }); } -- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27843,10 +26001,9 @@ new MTRNullableBooleanAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27887,21 +26044,16 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27911,10 +26063,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -27955,21 +26106,16 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27979,10 +26125,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28023,20 +26168,16 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28046,10 +26187,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28090,21 +26230,16 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28114,10 +26249,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28158,20 +26292,16 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28181,10 +26311,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28225,21 +26354,16 @@ new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, c }); } -- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28249,10 +26373,9 @@ new MTRNullableBooleanAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28293,21 +26416,16 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28317,10 +26435,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28361,21 +26478,17 @@ new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28385,10 +26498,9 @@ new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscr chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28432,21 +26544,17 @@ new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28456,10 +26564,9 @@ new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscri chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28503,20 +26610,16 @@ new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28526,10 +26629,9 @@ new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionB chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28571,20 +26673,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28594,10 +26692,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28638,21 +26735,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28662,10 +26754,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28723,20 +26814,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28746,10 +26833,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28790,20 +26876,16 @@ new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completi }); } -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28813,10 +26895,9 @@ new MTRVendorIdAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28857,20 +26938,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28880,10 +26957,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -28962,20 +27038,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28985,10 +27057,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29029,21 +27100,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29053,10 +27119,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29097,21 +27162,17 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29121,10 +27182,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29166,21 +27226,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29190,10 +27245,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29234,21 +27288,17 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29258,10 +27308,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29303,21 +27352,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29327,10 +27371,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29371,20 +27414,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29394,10 +27433,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29438,20 +27476,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29461,10 +27495,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29505,20 +27538,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29528,10 +27557,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29572,20 +27600,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29595,10 +27619,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29639,20 +27662,16 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29662,10 +27681,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29706,20 +27724,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29729,10 +27743,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29773,21 +27786,17 @@ new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29797,10 +27806,9 @@ new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBr chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29843,21 +27851,17 @@ new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29867,10 +27871,9 @@ new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBri chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29913,20 +27916,16 @@ new MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29936,10 +27935,9 @@ new MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -29981,20 +27979,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30004,10 +27998,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -30048,21 +28041,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30072,10 +28060,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -30133,21 +28120,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30157,10 +28139,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -30201,21 +28182,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30225,10 +28201,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -30269,21 +28244,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30293,10 +28263,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -30337,21 +28306,17 @@ new MTRSwitchGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30361,10 +28326,9 @@ new MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -30406,21 +28370,17 @@ new MTRSwitchAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30430,10 +28390,9 @@ new MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -30475,20 +28434,16 @@ new MTRSwitchAttributeListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30498,10 +28453,9 @@ new MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -30542,20 +28496,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30565,10 +28515,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -30609,21 +28558,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30633,10 +28577,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -30796,20 +28739,16 @@ new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallba }); } -- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30820,11 +28759,10 @@ new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallba chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -30868,21 +28806,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30892,10 +28825,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -30936,21 +28868,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30960,10 +28887,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -31004,21 +28930,17 @@ new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31028,10 +28950,9 @@ new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscr chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -31075,21 +28996,17 @@ new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31099,10 +29016,9 @@ new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscri chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -31146,20 +29062,16 @@ new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31169,10 +29081,9 @@ new MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionB chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -31214,20 +29125,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31237,10 +29144,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -31281,21 +29187,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31305,10 +29206,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -31583,25 +29483,21 @@ new MTROperationalCredentialsNOCsListAttributeCallbackBridge(self.callbackQueue, auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + return cppCluster.ReadAttribute( + successFn->mContext, successFn->mCall, failureFn->mCall, params.fabricFiltered); }); } -- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31611,10 +29507,9 @@ new MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -31653,25 +29548,21 @@ new MTROperationalCredentialsFabricsListAttributeCallbackBridge(self.callbackQue auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + return cppCluster.ReadAttribute( + successFn->mContext, successFn->mCall, failureFn->mCall, params.fabricFiltered); }); } -- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31681,10 +29572,9 @@ new MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -31726,21 +29616,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31750,10 +29635,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -31794,21 +29678,17 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31818,10 +29698,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -31864,22 +29743,17 @@ new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge( }); } -- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31889,10 +29763,9 @@ new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscri chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -31936,21 +29809,17 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31960,10 +29829,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -32005,21 +29873,17 @@ new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(sel }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32029,10 +29893,9 @@ new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscripti chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -32075,21 +29938,17 @@ new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32099,10 +29958,9 @@ new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptio chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -32145,20 +30003,16 @@ new MTROperationalCredentialsAttributeListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32168,10 +30022,9 @@ new MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridg chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -32213,20 +30066,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32236,10 +30085,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -32280,21 +30128,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32304,10 +30147,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -32527,8 +30369,8 @@ new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(self.callbackQue auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + return cppCluster.ReadAttribute( + successFn->mContext, successFn->mCall, failureFn->mCall, params.fabricFiltered); }); } @@ -32593,20 +30435,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32616,10 +30454,9 @@ new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -32659,25 +30496,21 @@ new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(self.callbackQueu auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + return cppCluster.ReadAttribute( + successFn->mContext, successFn->mCall, failureFn->mCall, params.fabricFiltered); }); } -- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32687,10 +30520,9 @@ new MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -32732,21 +30564,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32756,10 +30584,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -32801,21 +30628,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32825,10 +30648,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -32870,21 +30692,17 @@ new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32894,10 +30712,9 @@ new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBr chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -32940,21 +30757,17 @@ new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32964,10 +30777,9 @@ new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBri chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33010,20 +30822,16 @@ new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33033,10 +30841,9 @@ new MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33078,20 +30885,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33101,10 +30904,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33145,21 +30947,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33169,10 +30966,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33230,20 +31026,16 @@ new MTRFixedLabelLabelListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33253,10 +31045,9 @@ new MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge( chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33297,21 +31088,17 @@ new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33321,10 +31108,9 @@ new MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33367,21 +31153,17 @@ new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33391,10 +31173,9 @@ new MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33437,20 +31218,16 @@ new MTRFixedLabelAttributeListListAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33460,10 +31237,9 @@ new MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33504,20 +31280,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33527,10 +31299,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33571,21 +31342,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33595,10 +31361,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33716,20 +31481,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33739,10 +31500,9 @@ new MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge( chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33783,21 +31543,17 @@ new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33807,10 +31563,9 @@ new MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33853,21 +31608,17 @@ new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33877,10 +31628,9 @@ new MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33923,20 +31673,16 @@ new MTRUserLabelAttributeListListAttributeCallbackBridge(self.callbackQueue, sel }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33946,10 +31692,9 @@ new MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -33990,20 +31735,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34013,10 +31754,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -34057,21 +31797,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34081,10 +31816,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -34142,20 +31876,16 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34165,10 +31895,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -34209,21 +31938,17 @@ new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34233,10 +31958,9 @@ new MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -34279,21 +32003,17 @@ new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34303,10 +32023,9 @@ new MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -34349,20 +32068,16 @@ new MTRBooleanStateAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34372,10 +32087,9 @@ new MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -34416,20 +32130,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34439,10 +32149,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -34483,21 +32192,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34507,10 +32211,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -34595,20 +32298,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34618,10 +32317,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -34662,21 +32360,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34686,10 +32379,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -34730,21 +32422,16 @@ new MTRModeSelectSupportedModesListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34754,10 +32441,9 @@ new MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -34798,20 +32484,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34821,10 +32503,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -34908,20 +32589,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34931,10 +32608,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -35018,20 +32694,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35041,10 +32713,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -35085,21 +32756,17 @@ new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35109,10 +32776,9 @@ new MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -35155,21 +32821,17 @@ new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35179,10 +32841,9 @@ new MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -35225,20 +32886,16 @@ new MTRModeSelectAttributeListListAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35248,10 +32905,9 @@ new MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -35292,20 +32948,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35315,10 +32967,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -35359,21 +33010,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35383,10 +33029,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -36039,20 +33684,16 @@ new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36062,10 +33703,9 @@ new MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -36107,20 +33747,16 @@ new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(self.callbackQueue, self }); } -- (void)subscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36130,10 +33766,9 @@ new MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -36174,21 +33809,16 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36198,10 +33828,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -36242,20 +33871,16 @@ new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36265,10 +33890,9 @@ new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -36348,21 +33972,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36372,10 +33991,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -36454,21 +34072,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36478,10 +34091,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -36560,20 +34172,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36583,10 +34191,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -36628,22 +34235,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36653,10 +34255,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -36699,22 +34300,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36724,10 +34320,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -36770,22 +34365,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36795,10 +34385,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -36841,22 +34430,18 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36866,10 +34451,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -36913,22 +34497,18 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36938,10 +34518,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -36985,22 +34564,18 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37010,10 +34585,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -37055,21 +34629,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37079,10 +34648,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -37123,21 +34691,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37147,10 +34710,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -37191,21 +34753,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37215,10 +34772,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -37259,21 +34815,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37283,10 +34834,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -37328,21 +34878,17 @@ new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37352,10 +34898,9 @@ new MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -37398,22 +34943,18 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37423,10 +34964,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -37506,20 +35046,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37529,10 +35065,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -37611,20 +35146,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37634,10 +35165,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -37716,21 +35246,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37740,10 +35265,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -37822,20 +35346,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37845,10 +35365,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -37927,21 +35446,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37951,10 +35465,9 @@ new MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -37996,22 +35509,17 @@ new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38021,10 +35529,9 @@ new MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -38067,22 +35574,18 @@ new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38092,10 +35595,9 @@ new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -38177,21 +35679,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38201,10 +35699,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -38284,21 +35781,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38308,10 +35801,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -38391,21 +35883,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38415,10 +35903,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -38499,22 +35986,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38524,10 +36006,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -38608,22 +36089,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38633,10 +36109,9 @@ new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -38717,21 +36192,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38741,10 +36212,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -38825,22 +36295,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38850,10 +36316,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -38933,21 +36398,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38957,10 +36417,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -39040,22 +36499,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39065,10 +36520,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -39148,21 +36602,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39172,10 +36622,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -39217,21 +36666,17 @@ new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39241,10 +36686,9 @@ new MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -39287,21 +36731,17 @@ new MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39311,10 +36751,9 @@ new MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -39356,20 +36795,16 @@ new MTRDoorLockAttributeListListAttributeCallbackBridge(self.callbackQueue, self }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39379,10 +36814,9 @@ new MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -39423,20 +36857,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39446,10 +36876,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -39490,21 +36919,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39514,10 +36938,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -39776,20 +37199,16 @@ new MTRWindowCoveringClusterTypeAttributeCallbackBridge(self.callbackQueue, self }); } -- (void)subscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39799,10 +37218,9 @@ new MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -39844,22 +37262,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39869,10 +37282,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -39915,22 +37327,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39940,10 +37347,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -39985,21 +37391,17 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40009,10 +37411,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40054,21 +37455,17 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40078,10 +37475,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40124,21 +37520,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40148,10 +37540,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40194,21 +37585,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40218,10 +37605,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40263,20 +37649,16 @@ new MTRWindowCoveringConfigStatusAttributeCallbackBridge(self.callbackQueue, sel }); } -- (void)subscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40286,10 +37668,9 @@ new MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40331,22 +37712,18 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40356,10 +37733,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40402,22 +37778,18 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40427,10 +37799,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40472,21 +37843,16 @@ new MTRWindowCoveringOperationalStatusAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40496,10 +37862,9 @@ new MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40541,22 +37906,18 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40566,10 +37927,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40612,22 +37972,18 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40637,10 +37993,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40682,21 +38037,16 @@ new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40706,10 +38056,9 @@ new MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40752,22 +38101,18 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40777,10 +38122,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40823,22 +38167,18 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40848,10 +38188,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40894,21 +38233,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40918,10 +38253,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -40964,22 +38298,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40989,10 +38318,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -41035,21 +38363,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41059,10 +38383,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -41105,22 +38428,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41130,10 +38448,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -41213,20 +38530,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringModeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41236,10 +38549,9 @@ new MTRWindowCoveringModeAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -41280,20 +38592,16 @@ new MTRWindowCoveringSafetyStatusAttributeCallbackBridge(self.callbackQueue, sel }); } -- (void)subscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41303,10 +38611,9 @@ new MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -41347,21 +38654,17 @@ new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41371,10 +38674,9 @@ new MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -41417,21 +38719,17 @@ new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41441,10 +38739,9 @@ new MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -41487,20 +38784,16 @@ new MTRWindowCoveringAttributeListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41510,10 +38803,9 @@ new MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -41554,20 +38846,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41577,10 +38865,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -41621,21 +38908,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41645,10 +38927,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -41765,21 +39046,17 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41789,10 +39066,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -41834,21 +39110,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41858,10 +39130,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -41903,21 +39174,17 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41927,10 +39194,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -42010,21 +39276,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42034,10 +39295,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -42116,21 +39376,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42140,10 +39396,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -42224,22 +39479,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42249,10 +39499,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -42333,22 +39582,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42358,10 +39602,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -42441,21 +39684,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42465,10 +39703,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -42547,21 +39784,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42571,10 +39804,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -42616,21 +39848,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42640,10 +39867,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -42684,21 +39910,17 @@ new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42708,10 +39930,9 @@ new MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -42754,21 +39975,17 @@ new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42778,10 +39995,9 @@ new MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -42824,20 +40040,16 @@ new MTRBarrierControlAttributeListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42847,10 +40059,9 @@ new MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -42891,20 +40102,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42914,10 +40121,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -42958,21 +40164,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42982,10 +40183,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43043,20 +40243,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43066,10 +40262,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43110,20 +40305,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43133,10 +40324,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43177,20 +40367,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43200,10 +40386,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43244,21 +40429,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43268,10 +40448,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43312,21 +40491,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43336,10 +40510,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43380,21 +40553,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43404,10 +40572,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43448,21 +40615,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43472,10 +40634,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43516,21 +40677,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43540,10 +40696,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43584,21 +40739,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43608,10 +40758,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43652,20 +40801,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43675,10 +40820,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43719,20 +40863,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43742,10 +40882,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43786,20 +40925,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43809,10 +40944,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43853,20 +40987,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43876,10 +41006,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43920,20 +41049,16 @@ new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43943,10 +41068,9 @@ new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -43990,21 +41114,17 @@ new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridg }); } -- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44015,11 +41135,10 @@ new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubsc chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -44063,21 +41182,17 @@ new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( }); } -- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44087,10 +41202,9 @@ new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscri chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -44134,20 +41248,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44157,10 +41267,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -44201,20 +41310,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44224,10 +41329,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -44311,21 +41415,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44335,10 +41435,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -44380,20 +41479,16 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44403,10 +41498,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -44491,21 +41585,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44515,10 +41605,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -44599,21 +41688,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44624,11 +41708,10 @@ new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubsc chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -44709,20 +41792,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44732,10 +41811,9 @@ new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscri chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -44779,21 +41857,17 @@ new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridg }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44804,11 +41878,10 @@ new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubsc chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -44852,21 +41925,17 @@ new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44876,10 +41945,9 @@ new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscr chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -44923,20 +41991,16 @@ new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44946,10 +42010,9 @@ new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscription chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -44991,20 +42054,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45014,10 +42073,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -45058,21 +42116,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45082,10 +42135,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -45296,21 +42348,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45320,10 +42367,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -45364,21 +42410,17 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45388,10 +42430,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -45433,20 +42474,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45456,10 +42493,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -45501,22 +42537,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45526,10 +42557,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -45572,22 +42602,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45597,10 +42622,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -45643,22 +42667,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45668,10 +42687,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -45714,22 +42732,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45739,10 +42752,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -45784,21 +42796,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45808,10 +42815,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -45852,21 +42858,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45876,10 +42877,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -45959,22 +42959,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45984,10 +42979,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -46068,22 +43062,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - 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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46093,10 +43082,9 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -46177,22 +43165,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46202,10 +43185,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -46286,22 +43268,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46311,10 +43288,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -46395,22 +43371,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46420,10 +43391,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -46504,22 +43474,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46529,10 +43494,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -46612,21 +43576,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46636,10 +43596,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -46719,21 +43678,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46743,10 +43698,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -46826,21 +43780,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46850,10 +43800,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -46933,21 +43882,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46957,10 +43902,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -47040,21 +43984,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47064,10 +44004,9 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -47147,21 +44086,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47171,10 +44105,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -47254,22 +44187,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47279,10 +44207,9 @@ new MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBr chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -47363,20 +44290,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47386,10 +44309,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -47430,21 +44352,17 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47454,10 +44372,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -47499,20 +44416,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47522,10 +44435,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -47567,22 +44479,17 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47592,10 +44499,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -47638,22 +44544,17 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47663,10 +44564,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -47747,22 +44647,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47772,10 +44667,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -47862,22 +44756,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47887,10 +44777,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -47972,22 +44861,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47997,10 +44882,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -48043,21 +44927,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48067,10 +44947,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -48112,21 +44991,17 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48136,10 +45011,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -48181,21 +45055,17 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48205,10 +45075,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -48251,22 +45120,18 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48276,10 +45141,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -48364,21 +45228,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48388,10 +45247,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -48432,21 +45290,17 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48456,10 +45310,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -48501,21 +45354,17 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48525,10 +45374,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -48613,21 +45461,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48637,10 +45480,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -48681,21 +45523,17 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48705,10 +45543,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -48750,21 +45587,17 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - 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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48774,10 +45607,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -48857,21 +45689,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48881,10 +45709,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -48964,20 +45791,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - 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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48987,10 +45810,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -49069,20 +45891,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - 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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49092,10 +45910,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -49174,21 +45991,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49198,10 +46010,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -49280,21 +46091,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49304,10 +46110,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -49386,20 +46191,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49409,10 +46210,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -49491,21 +46291,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49515,10 +46310,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -49559,21 +46353,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49583,10 +46372,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -49665,21 +46453,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49689,10 +46472,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -49733,21 +46515,17 @@ new MTRThermostatGeneratedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49757,10 +46535,9 @@ new MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -49803,21 +46580,17 @@ new MTRThermostatAcceptedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49827,10 +46600,9 @@ new MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -49873,20 +46645,16 @@ new MTRThermostatAttributeListListAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49896,10 +46664,9 @@ new MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -49940,20 +46707,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49963,10 +46726,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -50007,21 +46769,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50031,10 +46788,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -50130,20 +46886,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50153,10 +46905,9 @@ new MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -50235,21 +46986,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50259,10 +47005,9 @@ new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -50347,21 +47092,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50371,10 +47111,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -50415,21 +47154,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50439,10 +47173,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -50483,20 +47216,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50506,10 +47235,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -50593,20 +47321,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50616,10 +47340,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -50660,20 +47383,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50683,10 +47402,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -50727,20 +47445,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50750,10 +47464,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -50832,20 +47545,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50855,10 +47564,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -50899,20 +47607,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50922,10 +47626,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -51004,20 +47707,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51027,10 +47726,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -51071,21 +47769,17 @@ new MTRFanControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51095,10 +47789,9 @@ new MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -51141,21 +47834,17 @@ new MTRFanControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51165,10 +47854,9 @@ new MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -51211,20 +47899,16 @@ new MTRFanControlAttributeListListAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51234,10 +47918,9 @@ new MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -51278,20 +47961,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51301,10 +47980,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -51345,21 +48023,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51369,10 +48042,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -51469,21 +48141,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51493,10 +48161,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -51576,21 +48243,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51600,10 +48262,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -51683,22 +48344,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51708,10 +48365,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -51755,21 +48411,17 @@ new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCall }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51780,11 +48432,10 @@ new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCall chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -51831,21 +48482,17 @@ new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallb }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51856,11 +48503,10 @@ new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallb chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -51906,20 +48552,16 @@ new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBri }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51930,11 +48572,10 @@ new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSub chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -51977,20 +48618,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52000,10 +48637,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -52044,21 +48680,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52068,10 +48699,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -52724,20 +49354,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52747,10 +49373,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -52791,21 +49416,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52815,10 +49435,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -52859,21 +49478,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52883,10 +49497,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -52927,20 +49540,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52950,10 +49559,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -52994,20 +49602,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53017,10 +49621,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53061,21 +49664,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53085,10 +49683,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53129,21 +49726,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53153,10 +49745,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53198,21 +49789,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53222,10 +49809,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53267,20 +49853,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53290,10 +49872,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53372,20 +49953,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53395,10 +49972,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53439,21 +50015,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53463,10 +50034,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53507,20 +50077,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53530,10 +50096,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53574,20 +50139,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53597,10 +50158,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53641,21 +50201,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53665,10 +50220,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53709,20 +50263,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53732,10 +50282,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53776,20 +50325,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53799,10 +50344,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53843,21 +50387,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53867,10 +50406,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53911,20 +50449,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53934,10 +50468,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -53978,20 +50511,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54001,10 +50530,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -54045,21 +50573,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54069,10 +50592,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -54113,20 +50635,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54136,10 +50654,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -54180,20 +50697,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54203,10 +50716,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -54247,21 +50759,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54271,10 +50778,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -54315,20 +50821,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54338,10 +50840,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -54382,20 +50883,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54405,10 +50902,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -54449,21 +50945,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54473,10 +50964,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -54517,20 +51007,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54540,10 +51026,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -54584,20 +51069,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54607,10 +51088,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -54651,21 +51131,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54675,10 +51150,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -54757,20 +51231,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54780,10 +51250,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -54862,20 +51331,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54885,10 +51350,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -54967,20 +51431,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54990,10 +51450,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -55072,20 +51531,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55095,10 +51550,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -55182,21 +51636,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55206,10 +51656,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -55289,20 +51738,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55312,10 +51757,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -55394,20 +51838,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55417,10 +51857,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -55504,21 +51943,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55528,10 +51963,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -55611,20 +52045,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55634,10 +52064,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -55716,20 +52145,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55739,10 +52164,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -55826,21 +52250,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55850,10 +52270,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -55895,21 +52314,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55919,10 +52334,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -55964,21 +52378,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55988,10 +52397,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56032,21 +52440,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56056,10 +52459,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56100,21 +52502,17 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56124,10 +52522,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56169,21 +52566,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56193,10 +52585,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56238,22 +52629,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56263,10 +52649,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56309,22 +52694,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56334,10 +52714,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56379,21 +52758,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56403,10 +52777,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56448,22 +52821,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56473,10 +52841,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56519,22 +52886,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56544,10 +52906,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56590,22 +52951,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56615,10 +52972,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56704,22 +53060,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56729,10 +53081,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56774,21 +53125,17 @@ new MTRColorControlGeneratedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56798,10 +53145,9 @@ new MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56844,21 +53190,17 @@ new MTRColorControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56868,10 +53210,9 @@ new MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56914,20 +53255,16 @@ new MTRColorControlAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56937,10 +53274,9 @@ new MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -56981,20 +53317,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57004,10 +53336,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -57048,21 +53379,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57072,10 +53398,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -57133,21 +53458,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57157,10 +53477,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -57201,21 +53520,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57225,10 +53539,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -57269,21 +53582,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57293,10 +53601,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -57375,20 +53682,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57398,10 +53701,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -57480,20 +53782,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57503,10 +53801,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -57591,21 +53888,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeIntrinsicBalanceFactorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57615,10 +53908,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -57704,22 +53996,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57729,10 +54016,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -57774,20 +54060,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57797,10 +54079,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -57879,20 +54160,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57902,10 +54179,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -57984,21 +54260,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58008,10 +54279,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -58095,21 +54365,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58119,10 +54384,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -58206,21 +54470,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58230,10 +54489,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -58312,21 +54570,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58336,10 +54589,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -58424,21 +54676,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58448,10 +54696,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -58493,21 +54740,17 @@ new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58517,10 +54760,9 @@ new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscription chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -58563,21 +54805,17 @@ new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58587,10 +54825,9 @@ new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionB chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -58633,20 +54870,16 @@ new MTRBallastConfigurationAttributeListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58656,10 +54889,9 @@ new MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -58701,20 +54933,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58724,10 +54952,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -58768,21 +54995,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58792,10 +55014,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -58853,21 +55074,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58877,10 +55093,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -58921,21 +55136,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58945,10 +55155,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -58989,21 +55198,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59013,10 +55217,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59057,20 +55260,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59080,10 +55279,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59124,21 +55322,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59148,10 +55341,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59192,21 +55384,17 @@ new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(sel }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59216,10 +55404,9 @@ new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscripti chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59262,21 +55449,17 @@ new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59286,10 +55469,9 @@ new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptio chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59332,20 +55514,16 @@ new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59355,10 +55533,9 @@ new MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridg chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59400,20 +55577,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59423,10 +55596,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59467,21 +55639,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59491,10 +55658,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59552,21 +55718,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59576,10 +55737,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59620,21 +55780,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59644,10 +55799,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59688,21 +55842,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59712,10 +55861,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59756,20 +55904,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59779,10 +55923,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59823,21 +55966,17 @@ new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(sel }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59847,10 +55986,9 @@ new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscripti chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59893,21 +56031,17 @@ new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59917,10 +56051,9 @@ new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptio chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -59963,20 +56096,16 @@ new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59986,10 +56115,9 @@ new MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridg chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60031,20 +56159,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60054,10 +56178,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60098,21 +56221,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60122,10 +56240,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60183,21 +56300,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60207,10 +56319,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60251,21 +56362,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60275,10 +56381,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60319,21 +56424,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60343,10 +56443,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60387,20 +56486,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60410,10 +56505,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60454,20 +56548,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60477,10 +56567,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60521,21 +56610,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60545,10 +56629,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60589,21 +56672,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60613,10 +56691,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60657,21 +56734,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60681,10 +56753,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60725,20 +56796,16 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60748,10 +56815,9 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60792,21 +56858,17 @@ new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60816,10 +56878,9 @@ new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionB chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60862,21 +56923,17 @@ new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60886,10 +56943,9 @@ new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBr chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -60932,20 +56988,16 @@ new MTRPressureMeasurementAttributeListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60955,10 +57007,9 @@ new MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61000,20 +57051,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61023,10 +57070,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61067,21 +57113,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61091,10 +57132,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61152,21 +57192,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61176,10 +57211,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61220,21 +57254,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61244,10 +57273,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61288,21 +57316,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61312,10 +57335,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61356,20 +57378,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61379,10 +57397,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61423,21 +57440,17 @@ new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61447,10 +57460,9 @@ new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61493,21 +57505,17 @@ new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61517,10 +57525,9 @@ new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61563,20 +57570,16 @@ new MTRFlowMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61586,10 +57589,9 @@ new MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61631,20 +57633,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61654,10 +57652,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61698,21 +57695,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61722,10 +57714,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61783,21 +57774,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61807,10 +57793,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61851,21 +57836,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61875,10 +57855,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61919,21 +57898,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61943,10 +57917,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -61987,20 +57960,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62010,10 +57979,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -62055,21 +58023,17 @@ new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridg }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62080,11 +58044,10 @@ new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubsc chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -62128,21 +58091,17 @@ new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62152,10 +58111,9 @@ new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscr chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -62199,20 +58157,16 @@ new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62222,10 +58176,9 @@ new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscription chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -62267,20 +58220,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62290,10 +58239,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -62334,21 +58282,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62358,10 +58301,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -62419,20 +58361,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62442,10 +58380,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -62486,21 +58423,17 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62510,10 +58443,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -62556,22 +58488,17 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62581,10 +58508,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -62665,22 +58591,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62690,10 +58612,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -62774,22 +58695,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62799,10 +58716,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -62884,22 +58800,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62909,10 +58821,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -62994,22 +58905,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63019,10 +58926,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -63104,22 +59010,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63129,10 +59031,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -63216,22 +59117,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63241,10 +59138,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -63328,22 +59224,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63353,10 +59245,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -63441,22 +59332,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63466,10 +59353,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -63554,22 +59440,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) - subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63579,10 +59461,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -63625,21 +59506,17 @@ new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(self.call }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63649,10 +59526,9 @@ new MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBrid chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -63695,21 +59571,17 @@ new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63719,10 +59591,9 @@ new MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -63765,20 +59636,16 @@ new MTROccupancySensingAttributeListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63788,10 +59655,9 @@ new MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -63833,20 +59699,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63856,10 +59718,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -63900,21 +59761,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63924,10 +59780,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -63985,20 +59840,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64008,10 +59859,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -64052,21 +59902,17 @@ new MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64076,10 +59922,9 @@ new MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -64122,21 +59967,17 @@ new MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64146,10 +59987,9 @@ new MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -64192,20 +60032,16 @@ new MTRWakeOnLanAttributeListListAttributeCallbackBridge(self.callbackQueue, sel }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64215,10 +60051,9 @@ new MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -64259,20 +60094,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64282,10 +60113,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -64326,21 +60156,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64350,10 +60175,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -64492,20 +60316,16 @@ new MTRChannelChannelListListAttributeCallbackBridge(self.callbackQueue, self.de }); } -- (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRChannelChannelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64515,10 +60335,9 @@ new MTRChannelChannelListListAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -64560,21 +60379,17 @@ new MTRChannelLineupStructAttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRChannelLineupStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64584,10 +60399,9 @@ new MTRChannelLineupStructAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -64630,21 +60444,17 @@ new MTRChannelCurrentChannelStructAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64654,10 +60464,9 @@ new MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -64699,21 +60508,17 @@ new MTRChannelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64723,10 +60528,9 @@ new MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -64768,21 +60572,17 @@ new MTRChannelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64792,10 +60592,9 @@ new MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -64837,20 +60636,16 @@ new MTRChannelAttributeListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRChannelAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64860,10 +60655,9 @@ new MTRChannelAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -64904,20 +60698,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64927,10 +60717,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -64971,21 +60760,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64995,10 +60779,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -65085,20 +60868,16 @@ new MTRTargetNavigatorTargetListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65108,10 +60887,9 @@ new MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge( chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -65152,21 +60930,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65176,10 +60949,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -65220,21 +60992,17 @@ new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65244,10 +61012,9 @@ new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -65290,21 +61057,17 @@ new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65314,10 +61077,9 @@ new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -65360,20 +61122,16 @@ new MTRTargetNavigatorAttributeListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65383,10 +61141,9 @@ new MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -65428,20 +61185,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65451,10 +61204,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -65495,21 +61247,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65519,10 +61266,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -65887,20 +61633,16 @@ new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65910,10 +61652,9 @@ new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -65955,20 +61696,16 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65978,10 +61715,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -66022,20 +61758,16 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66045,10 +61777,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -66090,21 +61821,17 @@ new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66114,10 +61841,9 @@ new MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -66160,21 +61886,16 @@ new MTRFloatAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFloatAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66184,10 +61905,9 @@ new MTRFloatAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -66228,20 +61948,16 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66251,10 +61967,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -66295,21 +62010,16 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66319,10 +62029,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -66363,21 +62072,17 @@ new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66387,10 +62092,9 @@ new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -66433,21 +62137,17 @@ new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66457,10 +62157,9 @@ new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -66503,20 +62202,16 @@ new MTRMediaPlaybackAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66526,10 +62221,9 @@ new MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -66570,20 +62264,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66593,10 +62283,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -66637,21 +62326,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66661,10 +62345,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -66839,20 +62522,16 @@ new MTRMediaInputInputListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaInputInputListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66862,10 +62541,9 @@ new MTRMediaInputInputListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -66906,20 +62584,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66929,10 +62603,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -66973,21 +62646,17 @@ new MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66997,10 +62666,9 @@ new MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -67043,21 +62711,17 @@ new MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67067,10 +62731,9 @@ new MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -67113,20 +62776,16 @@ new MTRMediaInputAttributeListListAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67136,10 +62795,9 @@ new MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -67180,20 +62838,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67203,10 +62857,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -67247,21 +62900,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67271,10 +62919,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -67362,21 +63009,17 @@ new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67386,10 +63029,9 @@ new MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -67432,21 +63074,17 @@ new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67456,10 +63094,9 @@ new MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -67501,20 +63138,16 @@ new MTRLowPowerAttributeListListAttributeCallbackBridge(self.callbackQueue, self }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67524,10 +63157,9 @@ new MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -67568,20 +63200,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67591,10 +63219,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -67635,21 +63262,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67659,10 +63281,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -67745,21 +63366,17 @@ new MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67769,10 +63386,9 @@ new MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -67815,21 +63431,17 @@ new MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67839,10 +63451,9 @@ new MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -67885,20 +63496,16 @@ new MTRKeypadInputAttributeListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67908,10 +63515,9 @@ new MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -67952,20 +63558,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67975,10 +63577,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -68019,21 +63620,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68043,10 +63639,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -68308,20 +63903,16 @@ new MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68331,10 +63922,9 @@ new MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge( chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -68414,22 +64004,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68439,10 +64024,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -68484,21 +64068,17 @@ new MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68508,10 +64088,9 @@ new MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -68554,21 +64133,17 @@ new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68578,10 +64153,9 @@ new MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -68624,20 +64198,16 @@ new MTRContentLauncherAttributeListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68647,10 +64217,9 @@ new MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -68692,20 +64261,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68715,10 +64280,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -68759,21 +64323,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68783,10 +64342,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -68899,20 +64457,16 @@ new MTRAudioOutputOutputListListAttributeCallbackBridge(self.callbackQueue, self }); } -- (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68922,10 +64476,9 @@ new MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -68966,21 +64519,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68990,10 +64538,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -69034,21 +64581,17 @@ new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69058,10 +64601,9 @@ new MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -69104,21 +64646,17 @@ new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69128,10 +64666,9 @@ new MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -69174,20 +64711,16 @@ new MTRAudioOutputAttributeListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69197,10 +64730,9 @@ new MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -69241,20 +64773,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69264,10 +64792,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -69308,21 +64835,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69332,10 +64854,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -69475,20 +64996,16 @@ new MTRApplicationLauncherCatalogListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69498,10 +65015,9 @@ new MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -69595,21 +65111,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69619,10 +65131,9 @@ new MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -69665,21 +65176,17 @@ new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69689,10 +65196,9 @@ new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionB chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -69735,21 +65241,17 @@ new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69759,10 +65261,9 @@ new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBr chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -69805,20 +65306,16 @@ new MTRApplicationLauncherAttributeListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69828,10 +65325,9 @@ new MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -69873,20 +65369,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69896,10 +65388,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -69940,21 +65431,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69964,10 +65450,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -70025,20 +65510,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70048,10 +65529,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -70092,20 +65572,16 @@ new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completi }); } -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70115,10 +65591,9 @@ new MTRVendorIdAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -70159,21 +65634,16 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70183,10 +65653,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -70227,20 +65696,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70250,10 +65715,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -70295,22 +65759,17 @@ new MTRApplicationBasicApplicationStructAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70320,10 +65779,9 @@ new MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -70367,20 +65825,16 @@ new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70390,10 +65844,9 @@ new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscription chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -70435,21 +65888,17 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70459,10 +65908,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -70504,21 +65952,16 @@ new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70528,10 +65971,9 @@ new MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -70573,21 +66015,17 @@ new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(self.call }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70597,10 +66035,9 @@ new MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBrid chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -70643,21 +66080,17 @@ new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70667,10 +66100,9 @@ new MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -70713,20 +66145,16 @@ new MTRApplicationBasicAttributeListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70736,10 +66164,9 @@ new MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -70781,20 +66208,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70804,10 +66227,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -70848,21 +66270,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70872,10 +66289,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71025,21 +66441,17 @@ new MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71049,10 +66461,9 @@ new MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71095,21 +66506,17 @@ new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71119,10 +66526,9 @@ new MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71165,20 +66571,16 @@ new MTRAccountLoginAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71188,10 +66590,9 @@ new MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71232,20 +66633,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71255,10 +66652,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71299,21 +66695,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71323,10 +66714,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71445,21 +66835,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71469,10 +66854,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71513,20 +66897,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71536,10 +66916,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71580,20 +66959,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71603,10 +66978,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71647,20 +67021,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71670,10 +67040,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71714,20 +67083,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71737,10 +67102,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71781,20 +67145,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71804,10 +67164,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71848,20 +67207,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71871,10 +67226,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71915,20 +67269,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71938,10 +67288,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -71982,20 +67331,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72005,10 +67350,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72049,20 +67393,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72072,10 +67412,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72116,21 +67455,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72140,10 +67475,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72185,21 +67519,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72209,10 +67538,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72253,21 +67581,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72277,10 +67601,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72322,21 +67645,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72346,10 +67664,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72390,21 +67707,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72414,10 +67726,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72458,21 +67769,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72482,10 +67788,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72526,20 +67831,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72549,10 +67850,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72593,21 +67893,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72617,10 +67912,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72661,21 +67955,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72685,10 +67974,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72729,21 +68017,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72753,10 +68036,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72797,21 +68079,16 @@ new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72821,10 +68098,9 @@ new MTRInt32sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72865,21 +68141,17 @@ new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72889,10 +68161,9 @@ new MTRInt32sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -72934,21 +68205,17 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72958,10 +68225,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73004,22 +68270,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73029,10 +68290,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73075,22 +68335,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73100,10 +68355,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73146,22 +68400,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73171,10 +68420,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73217,22 +68465,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73242,10 +68485,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73288,22 +68530,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73313,10 +68550,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73359,22 +68595,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73384,10 +68615,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73430,22 +68660,18 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73455,10 +68681,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73501,22 +68726,18 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73526,10 +68747,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73572,22 +68792,18 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73597,10 +68813,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73643,22 +68858,18 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73668,10 +68879,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73714,22 +68924,18 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73739,10 +68945,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73785,22 +68990,18 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73810,10 +69011,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73855,21 +69055,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73879,10 +69075,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73924,21 +69119,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73948,10 +69139,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -73993,21 +69183,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74017,10 +69202,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74061,20 +69245,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74084,10 +69264,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74129,22 +69308,17 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74154,10 +69328,9 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74200,22 +69373,18 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74225,10 +69394,9 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74270,21 +69438,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74294,10 +69458,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74340,22 +69503,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74365,10 +69523,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74411,22 +69568,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74436,10 +69588,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74482,22 +69633,18 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74507,10 +69654,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74552,21 +69698,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74576,10 +69718,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74621,20 +69762,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74644,10 +69781,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74688,21 +69824,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74712,10 +69843,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74756,21 +69886,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74780,10 +69905,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74824,20 +69948,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74847,10 +69967,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74891,21 +70010,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74915,10 +70029,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -74959,21 +70072,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74983,10 +70091,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -75027,20 +70134,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75050,10 +70153,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -75094,21 +70196,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75118,10 +70215,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -75162,21 +70258,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75186,10 +70277,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -75230,21 +70320,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75254,10 +70339,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -75298,21 +70382,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75322,10 +70401,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -75366,20 +70444,16 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75389,10 +70463,9 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -75473,22 +70546,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75498,10 +70567,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -75582,22 +70650,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75607,10 +70671,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -75691,22 +70754,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75716,10 +70774,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -75800,22 +70857,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75825,10 +70878,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -75908,21 +70960,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75932,10 +70980,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76015,21 +71062,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -76039,10 +71082,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76084,21 +71126,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -76108,10 +71146,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76153,21 +71190,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -76177,10 +71209,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76221,21 +71252,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -76245,10 +71272,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76290,21 +71316,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -76314,10 +71335,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76358,21 +71378,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -76382,10 +71397,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76426,21 +71440,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -76450,10 +71459,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76532,21 +71540,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -76556,10 +71560,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76601,21 +71604,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -76625,10 +71623,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76669,21 +71666,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -76693,10 +71685,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76775,21 +71766,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -76799,10 +71786,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76844,21 +71830,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -76868,10 +71849,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76912,21 +71892,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -76936,10 +71911,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -76980,21 +71954,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77004,10 +71974,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77050,22 +72019,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77075,10 +72039,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77120,21 +72083,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77144,10 +72103,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77190,21 +72148,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77214,10 +72168,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77259,21 +72212,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77283,10 +72232,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77329,21 +72277,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77353,10 +72297,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77398,21 +72341,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77422,10 +72360,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77466,21 +72403,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77490,10 +72422,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77534,21 +72465,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77558,10 +72484,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77602,21 +72527,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77626,10 +72547,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77671,21 +72591,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77695,10 +72611,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77740,21 +72655,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77764,10 +72674,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77808,21 +72717,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77832,10 +72737,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77877,21 +72781,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77901,10 +72801,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -77946,21 +72845,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77970,10 +72864,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78014,21 +72907,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78038,10 +72927,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78083,21 +72971,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78107,10 +72991,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78152,21 +73035,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78176,10 +73054,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78220,21 +73097,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78244,10 +73117,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78289,21 +73161,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78313,10 +73181,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78358,21 +73225,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78382,10 +73245,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78427,21 +73289,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78451,10 +73309,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78496,21 +73353,16 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78520,10 +73372,9 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78565,22 +73416,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78590,10 +73437,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78637,22 +73483,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78662,10 +73504,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78708,22 +73549,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78733,10 +73570,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78779,22 +73615,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78804,10 +73636,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78850,22 +73681,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78875,10 +73702,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78921,22 +73747,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78946,10 +73767,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -78992,22 +73812,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79017,10 +73832,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79062,21 +73876,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79086,10 +73895,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79130,21 +73938,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79154,10 +73958,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79199,21 +74002,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79223,10 +74022,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79268,21 +74066,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79292,10 +74085,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79336,21 +74128,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79360,10 +74148,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79405,21 +74192,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79429,10 +74212,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79474,21 +74256,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79498,10 +74275,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79542,21 +74318,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79566,10 +74338,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79611,21 +74382,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79635,10 +74402,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79680,21 +74446,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79704,10 +74465,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79748,21 +74508,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79772,10 +74528,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79817,21 +74572,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79841,10 +74592,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79886,21 +74636,17 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79910,10 +74656,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -79955,21 +74700,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79979,10 +74720,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -80024,21 +74764,16 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80048,10 +74783,9 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -80093,22 +74827,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80118,10 +74848,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -80165,22 +74894,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80190,10 +74915,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -80236,22 +74960,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80261,10 +74981,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -80307,22 +75026,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80332,10 +75047,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -80378,22 +75092,18 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80403,10 +75113,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -80449,22 +75158,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80474,10 +75178,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -80520,22 +75223,17 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80545,10 +75243,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -80590,21 +75287,17 @@ new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80614,10 +75307,9 @@ new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptio chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -80660,21 +75352,17 @@ new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80684,10 +75372,9 @@ new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscription chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -80730,20 +75417,16 @@ new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80753,10 +75436,9 @@ new MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -80798,20 +75480,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80821,10 +75499,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -80865,21 +75542,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80889,10 +75561,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -82306,20 +76977,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBooleanWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82329,10 +76996,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -82411,20 +77077,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBitmap8WithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82434,10 +77096,9 @@ new MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -82516,20 +77177,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBitmap16WithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82539,10 +77196,9 @@ new MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -82621,20 +77277,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBitmap32WithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82644,10 +77296,9 @@ new MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -82726,20 +77377,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBitmap64WithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82749,10 +77396,9 @@ new MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -82831,20 +77477,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt8uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82854,10 +77496,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -82936,20 +77577,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt16uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82959,10 +77596,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -83041,20 +77677,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt24uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83064,10 +77696,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -83146,20 +77777,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt32uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83169,10 +77796,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -83251,20 +77877,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt40uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83274,10 +77896,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -83356,20 +77977,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt48uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83379,10 +77996,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -83461,20 +78077,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt56uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83484,10 +78096,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -83566,20 +78177,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt64uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83589,10 +78196,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -83671,20 +78277,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt8sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83694,10 +78296,9 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -83776,20 +78377,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt16sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83799,10 +78396,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -83881,20 +78477,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt24sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83904,10 +78496,9 @@ new MTRInt32sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -83986,20 +78577,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt32sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84009,10 +78596,9 @@ new MTRInt32sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -84091,20 +78677,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt40sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84114,10 +78696,9 @@ new MTRInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -84196,20 +78777,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt48sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84219,10 +78796,9 @@ new MTRInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -84301,20 +78877,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt56sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84324,10 +78896,9 @@ new MTRInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -84406,20 +78977,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt64sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84429,10 +78996,9 @@ new MTRInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -84511,20 +79077,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnum8WithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84534,10 +79096,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -84616,20 +79177,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnum16WithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84639,10 +79196,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -84721,20 +79277,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFloatSingleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRFloatAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84744,10 +79296,9 @@ new MTRFloatAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -84826,20 +79377,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFloatDoubleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoubleAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84849,10 +79396,9 @@ new MTRDoubleAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -84931,20 +79477,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOctetStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84954,10 +79496,9 @@ new MTROctetStringAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -85057,20 +79598,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeListInt8uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85080,10 +79617,9 @@ new MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -85183,21 +79719,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeListOctetStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85207,10 +79738,9 @@ new MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -85311,21 +79841,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListStructOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeListStructOctetStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85335,10 +79861,9 @@ new MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -85419,21 +79944,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLongOctetStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTROctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85443,10 +79963,9 @@ new MTROctetStringAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -85525,20 +80044,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCharStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85548,10 +80063,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -85630,21 +80144,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLongCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLongCharStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85654,10 +80163,9 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -85736,20 +80244,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEpochUsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEpochUsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85759,10 +80263,9 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -85841,20 +80344,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEpochSWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEpochSWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85864,10 +80363,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -85946,20 +80444,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85969,10 +80463,9 @@ new MTRVendorIdAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -86245,22 +80738,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListNullablesAndOptionalsStructWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeListNullablesAndOptionalsStructWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -86270,10 +80759,9 @@ new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscripti chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + nil, params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -86354,20 +80842,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnumAttrWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -86377,10 +80861,9 @@ new MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -86468,21 +80951,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeStructAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -86492,10 +80971,9 @@ new MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -86575,21 +81053,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRangeRestrictedInt8uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -86599,10 +81073,9 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -86682,21 +81155,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRangeRestrictedInt8sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -86706,10 +81175,9 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -86789,21 +81257,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRangeRestrictedInt16uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -86813,10 +81277,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -86896,21 +81359,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRangeRestrictedInt16sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -86920,10 +81379,9 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -87024,21 +81482,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeListLongOctetStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -87048,10 +81502,9 @@ new MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -87092,8 +81545,8 @@ new MTRTestClusterListFabricScopedListAttributeCallbackBridge(self.callbackQueue auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + return cppCluster.ReadAttribute( + successFn->mContext, successFn->mCall, failureFn->mCall, params.fabricFiltered); }); } @@ -87212,21 +81665,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListFabricScopedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeListFabricScopedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -87236,10 +81684,9 @@ new MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -87318,21 +81765,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeTimedWriteBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTimedWriteBooleanWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -87342,10 +81784,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -87424,21 +81865,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeGeneralErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneralErrorBooleanWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -87448,10 +81885,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -87531,21 +81967,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeClusterErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterErrorBooleanWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -87555,10 +81987,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -87638,20 +82069,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUnsupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnsupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -87661,10 +82088,9 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -87748,21 +82174,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableBooleanWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -87772,10 +82193,9 @@ new MTRNullableBooleanAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -87859,21 +82279,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableBitmap8WithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -87883,10 +82298,9 @@ new MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -87970,21 +82384,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableBitmap16WithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -87994,10 +82403,9 @@ new MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -88081,21 +82489,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableBitmap32WithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -88105,10 +82508,9 @@ new MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -88192,21 +82594,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableBitmap64WithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -88216,10 +82613,9 @@ new MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -88303,21 +82699,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt8uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -88327,10 +82718,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -88414,21 +82804,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt16uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -88438,10 +82823,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -88525,21 +82909,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt24uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -88549,10 +82928,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -88636,21 +83014,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt32uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -88660,10 +83033,9 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -88747,21 +83119,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt40uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -88771,10 +83138,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -88858,21 +83224,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt48uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -88882,10 +83243,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -88969,21 +83329,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -88993,10 +83348,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -89080,21 +83434,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -89104,10 +83453,9 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -89191,21 +83539,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt8sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -89215,10 +83558,9 @@ new MTRNullableInt8sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -89302,21 +83644,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt16sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -89326,10 +83663,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -89413,21 +83749,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt24sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -89437,10 +83768,9 @@ new MTRNullableInt32sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -89524,21 +83854,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt32sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -89548,10 +83873,9 @@ new MTRNullableInt32sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -89635,21 +83959,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt40sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -89659,10 +83978,9 @@ new MTRNullableInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -89746,21 +84064,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt48sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -89770,10 +84083,9 @@ new MTRNullableInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -89857,21 +84169,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt56sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -89881,10 +84188,9 @@ new MTRNullableInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -89968,21 +84274,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt64sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -89992,10 +84293,9 @@ new MTRNullableInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -90079,21 +84379,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableEnum8WithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -90103,10 +84398,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -90190,21 +84484,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableEnum16WithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -90214,10 +84503,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -90301,21 +84589,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableFloatSingleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableFloatAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -90325,10 +84609,9 @@ new MTRNullableFloatAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -90413,21 +84696,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableFloatDoubleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableDoubleAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -90437,10 +84716,9 @@ new MTRNullableDoubleAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -90525,21 +84803,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableOctetStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -90549,10 +84822,9 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -90636,21 +84908,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableCharStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -90660,10 +84928,9 @@ new MTRNullableCharStringAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -90748,21 +85015,16 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableEnumAttrWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -90772,10 +85034,9 @@ new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -90871,21 +85132,17 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableStructWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -90895,10 +85152,9 @@ new MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -90984,22 +85240,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableRangeRestrictedInt8uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -91009,10 +85261,9 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -91098,22 +85349,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableRangeRestrictedInt8sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -91123,10 +85370,9 @@ new MTRNullableInt8sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -91212,22 +85458,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableRangeRestrictedInt16uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -91237,10 +85479,9 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -91326,22 +85567,18 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableRangeRestrictedInt16sWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -91351,10 +85588,9 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -91396,21 +85632,17 @@ new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -91420,10 +85652,9 @@ new MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -91466,21 +85697,17 @@ new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -91490,10 +85717,9 @@ new MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -91536,20 +85762,16 @@ new MTRTestClusterAttributeListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -91559,10 +85781,9 @@ new MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + params.fabricFiltered, params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -91603,20 +85824,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -91626,10 +85843,9 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } @@ -91670,21 +85886,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)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 { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + if (!params.autoResubscribe) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -91694,10 +85905,9 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, + params.keepPreviousSubscriptions); }, subscriptionEstablished); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index ebb3da1bd0daed..c2b9221a493a4a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -32,9 +32,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterIdentify : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -75,9 +75,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterGroups : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -133,9 +133,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterScenes : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -219,9 +219,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterOnOff : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -306,9 +306,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterOnOffSwitchConfiguration : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params; @@ -340,9 +340,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterLevelControl : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -465,9 +465,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterBinaryInputBasic : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeActiveTextWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataValueDictionary @@ -538,9 +538,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterDescriptor : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeDeviceTypeListWithParams:(MTRReadParams * _Nullable)params; @@ -571,9 +571,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterBinding : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValueDictionary @@ -603,9 +603,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterAccessControl : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeAclWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeAclWithValue:(NSDictionary *)dataValueDictionary @@ -648,9 +648,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterActions : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -728,9 +728,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterBasic : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -816,9 +816,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterOtaSoftwareUpdateProvider : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -856,9 +856,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterOtaSoftwareUpdateRequestor : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -899,9 +899,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterLocalizationConfiguration : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeActiveLocaleWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)dataValueDictionary @@ -933,9 +933,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterTimeFormatLocalization : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeHourFormatWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeHourFormatWithValue:(NSDictionary *)dataValueDictionary @@ -974,9 +974,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterUnitLocalization : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeTemperatureUnitWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)dataValueDictionary @@ -1006,9 +1006,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterPowerSourceConfiguration : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeSourcesWithParams:(MTRReadParams * _Nullable)params; @@ -1033,9 +1033,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterPowerSource : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params; @@ -1120,9 +1120,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterGeneralCommissioning : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -1183,9 +1183,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterNetworkCommissioning : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -1260,9 +1260,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterDiagnosticLogs : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -1291,9 +1291,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterGeneralDiagnostics : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -1339,9 +1339,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterSoftwareDiagnostics : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -1380,9 +1380,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterThreadNetworkDiagnostics : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -1539,9 +1539,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterWiFiNetworkDiagnostics : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -1598,9 +1598,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterEthernetNetworkDiagnostics : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -1649,9 +1649,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterBridgedDeviceBasic : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params; @@ -1709,9 +1709,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterSwitch : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeNumberOfPositionsWithParams:(MTRReadParams * _Nullable)params; @@ -1740,9 +1740,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterAdministratorCommissioning : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -1787,9 +1787,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterOperationalCredentials : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -1864,9 +1864,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterGroupKeyManagement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -1921,9 +1921,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterFixedLabel : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params; @@ -1948,9 +1948,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterUserLabel : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataValueDictionary @@ -1980,9 +1980,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterBooleanState : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeStateValueWithParams:(MTRReadParams * _Nullable)params; @@ -2007,9 +2007,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterModeSelect : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -2059,9 +2059,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterDoorLock : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -2324,9 +2324,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterWindowCovering : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -2436,9 +2436,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterBarrierControl : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -2523,9 +2523,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterPumpConfigurationAndControl : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMaxPressureWithParams:(MTRReadParams * _Nullable)params; @@ -2614,9 +2614,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterThermostat : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -2893,9 +2893,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterFanControl : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeFanModeWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValueDictionary @@ -2970,9 +2970,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterThermostatUserInterfaceConfiguration : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeTemperatureDisplayModeWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeTemperatureDisplayModeWithValue:(NSDictionary *)dataValueDictionary @@ -3016,9 +3016,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterColorControl : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -3287,9 +3287,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterBallastConfiguration : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributePhysicalMinLevelWithParams:(MTRReadParams * _Nullable)params; @@ -3390,9 +3390,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterIlluminanceMeasurement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3425,9 +3425,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterTemperatureMeasurement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3458,9 +3458,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterPressureMeasurement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3501,9 +3501,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterFlowMeasurement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3534,9 +3534,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterRelativeHumidityMeasurement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3567,9 +3567,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterOccupancySensing : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params; @@ -3662,9 +3662,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterWakeOnLan : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMACAddressWithParams:(MTRReadParams * _Nullable)params; @@ -3689,9 +3689,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterChannel : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -3734,9 +3734,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterTargetNavigator : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -3769,9 +3769,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterMediaPlayback : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -3896,9 +3896,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterMediaInput : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -3948,9 +3948,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterLowPower : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -3981,9 +3981,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterKeypadInput : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -4012,9 +4012,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterContentLauncher : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -4057,9 +4057,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterAudioOutput : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -4095,9 +4095,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterApplicationLauncher : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -4145,9 +4145,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterApplicationBasic : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params; @@ -4186,9 +4186,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterAccountLogin : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -4228,9 +4228,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterElectricalMeasurement : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries @@ -4561,9 +4561,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterTestCluster : MTRCluster -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index e299b9c782e8e1..a7c1fa96dfc987 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRIdentifyClusterTriggerEffectParams : NSObject @@ -64,7 +64,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupsClusterAddGroupParams : NSObject @@ -88,7 +88,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupsClusterAddGroupResponseParams : NSObject @@ -112,7 +112,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupsClusterViewGroupParams : NSObject @@ -134,7 +134,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupsClusterViewGroupResponseParams : NSObject @@ -160,7 +160,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupsClusterGetGroupMembershipParams : NSObject @@ -182,7 +182,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupsClusterGetGroupMembershipResponseParams : NSObject @@ -206,7 +206,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupsClusterRemoveGroupParams : NSObject @@ -228,7 +228,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupsClusterRemoveGroupResponseParams : NSObject @@ -252,7 +252,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupsClusterRemoveAllGroupsParams : NSObject /** @@ -272,7 +272,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupsClusterAddGroupIfIdentifyingParams : NSObject @@ -296,7 +296,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterAddSceneParams : NSObject @@ -326,7 +326,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterAddSceneResponseParams : NSObject @@ -352,7 +352,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterViewSceneParams : NSObject @@ -376,7 +376,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterViewSceneResponseParams : NSObject @@ -408,7 +408,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterRemoveSceneParams : NSObject @@ -432,7 +432,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterRemoveSceneResponseParams : NSObject @@ -458,7 +458,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterRemoveAllScenesParams : NSObject @@ -480,7 +480,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterRemoveAllScenesResponseParams : NSObject @@ -504,7 +504,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterStoreSceneParams : NSObject @@ -528,7 +528,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterStoreSceneResponseParams : NSObject @@ -554,7 +554,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterRecallSceneParams : NSObject @@ -580,7 +580,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterGetSceneMembershipParams : NSObject @@ -602,7 +602,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterGetSceneMembershipResponseParams : NSObject @@ -630,7 +630,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterEnhancedAddSceneParams : NSObject @@ -660,7 +660,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterEnhancedAddSceneResponseParams : NSObject @@ -686,7 +686,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterEnhancedViewSceneParams : NSObject @@ -710,7 +710,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterEnhancedViewSceneResponseParams : NSObject @@ -742,7 +742,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterCopySceneParams : NSObject @@ -772,7 +772,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterCopySceneResponseParams : NSObject @@ -798,7 +798,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROnOffClusterOffParams : NSObject /** @@ -818,7 +818,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROnOffClusterOnParams : NSObject /** @@ -838,7 +838,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROnOffClusterToggleParams : NSObject /** @@ -858,7 +858,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROnOffClusterOffWithEffectParams : NSObject @@ -882,7 +882,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROnOffClusterOnWithRecallGlobalSceneParams : NSObject /** @@ -902,7 +902,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROnOffClusterOnWithTimedOffParams : NSObject @@ -928,7 +928,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRLevelControlClusterMoveToLevelParams : NSObject @@ -956,7 +956,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRLevelControlClusterMoveParams : NSObject @@ -984,7 +984,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRLevelControlClusterStepParams : NSObject @@ -1014,7 +1014,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRLevelControlClusterStopParams : NSObject @@ -1038,7 +1038,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRLevelControlClusterMoveToLevelWithOnOffParams : NSObject @@ -1066,7 +1066,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRLevelControlClusterMoveWithOnOffParams : NSObject @@ -1094,7 +1094,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRLevelControlClusterStepWithOnOffParams : NSObject @@ -1124,7 +1124,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRLevelControlClusterStopWithOnOffParams : NSObject @@ -1148,7 +1148,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRLevelControlClusterMoveToClosestFrequencyParams : NSObject @@ -1170,7 +1170,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterInstantActionParams : NSObject @@ -1194,7 +1194,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterInstantActionWithTransitionParams : NSObject @@ -1220,7 +1220,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterStartActionParams : NSObject @@ -1244,7 +1244,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterStartActionWithDurationParams : NSObject @@ -1270,7 +1270,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterStopActionParams : NSObject @@ -1294,7 +1294,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterPauseActionParams : NSObject @@ -1318,7 +1318,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterPauseActionWithDurationParams : NSObject @@ -1344,7 +1344,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterResumeActionParams : NSObject @@ -1368,7 +1368,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterEnableActionParams : NSObject @@ -1392,7 +1392,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterEnableActionWithDurationParams : NSObject @@ -1418,7 +1418,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterDisableActionParams : NSObject @@ -1442,7 +1442,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterDisableActionWithDurationParams : NSObject @@ -1468,7 +1468,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBasicClusterMfgSpecificPingParams : NSObject /** @@ -1488,7 +1488,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROtaSoftwareUpdateProviderClusterQueryImageParams : NSObject @@ -1524,7 +1524,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams : NSObject @@ -1560,7 +1560,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams : NSObject @@ -1584,7 +1584,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams : NSObject @@ -1608,7 +1608,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams : NSObject @@ -1632,7 +1632,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams : NSObject @@ -1662,7 +1662,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGeneralCommissioningClusterArmFailSafeParams : NSObject @@ -1686,7 +1686,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGeneralCommissioningClusterArmFailSafeResponseParams : NSObject @@ -1710,7 +1710,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGeneralCommissioningClusterSetRegulatoryConfigParams : NSObject @@ -1736,7 +1736,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams : NSObject @@ -1760,7 +1760,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGeneralCommissioningClusterCommissioningCompleteParams : NSObject /** @@ -1780,7 +1780,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGeneralCommissioningClusterCommissioningCompleteResponseParams : NSObject @@ -1804,7 +1804,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRNetworkCommissioningClusterScanNetworksParams : NSObject @@ -1828,7 +1828,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRNetworkCommissioningClusterScanNetworksResponseParams : NSObject @@ -1856,7 +1856,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams : NSObject @@ -1882,7 +1882,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams : NSObject @@ -1906,7 +1906,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRNetworkCommissioningClusterRemoveNetworkParams : NSObject @@ -1930,7 +1930,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRNetworkCommissioningClusterNetworkConfigResponseParams : NSObject @@ -1956,7 +1956,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRNetworkCommissioningClusterConnectNetworkParams : NSObject @@ -1980,7 +1980,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRNetworkCommissioningClusterConnectNetworkResponseParams : NSObject @@ -2006,7 +2006,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRNetworkCommissioningClusterReorderNetworkParams : NSObject @@ -2032,7 +2032,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDiagnosticLogsClusterRetrieveLogsRequestParams : NSObject @@ -2058,7 +2058,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDiagnosticLogsClusterRetrieveLogsResponseParams : NSObject @@ -2086,7 +2086,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGeneralDiagnosticsClusterTestEventTriggerParams : NSObject @@ -2110,7 +2110,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRSoftwareDiagnosticsClusterResetWatermarksParams : NSObject /** @@ -2130,7 +2130,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRThreadNetworkDiagnosticsClusterResetCountsParams : NSObject /** @@ -2150,7 +2150,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRWiFiNetworkDiagnosticsClusterResetCountsParams : NSObject /** @@ -2170,7 +2170,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTREthernetNetworkDiagnosticsClusterResetCountsParams : NSObject /** @@ -2190,7 +2190,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTimeSynchronizationClusterSetUtcTimeParams : NSObject @@ -2216,7 +2216,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams : NSObject @@ -2246,7 +2246,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams : NSObject @@ -2268,7 +2268,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAdministratorCommissioningClusterRevokeCommissioningParams : NSObject /** @@ -2288,7 +2288,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterAttestationRequestParams : NSObject @@ -2310,7 +2310,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterAttestationResponseParams : NSObject @@ -2334,7 +2334,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterCertificateChainRequestParams : NSObject @@ -2356,7 +2356,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterCertificateChainResponseParams : NSObject @@ -2378,7 +2378,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterCSRRequestParams : NSObject @@ -2402,7 +2402,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterCSRResponseParams : NSObject @@ -2426,7 +2426,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterAddNOCParams : NSObject @@ -2456,7 +2456,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterUpdateNOCParams : NSObject @@ -2480,7 +2480,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterNOCResponseParams : NSObject @@ -2506,7 +2506,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterUpdateFabricLabelParams : NSObject @@ -2528,7 +2528,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterRemoveFabricParams : NSObject @@ -2550,7 +2550,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams : NSObject @@ -2572,7 +2572,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupKeyManagementClusterKeySetWriteParams : NSObject @@ -2594,7 +2594,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupKeyManagementClusterKeySetReadParams : NSObject @@ -2616,7 +2616,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupKeyManagementClusterKeySetReadResponseParams : NSObject @@ -2638,7 +2638,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupKeyManagementClusterKeySetRemoveParams : NSObject @@ -2660,7 +2660,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupKeyManagementClusterKeySetReadAllIndicesParams : NSObject @@ -2682,7 +2682,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams : NSObject @@ -2704,7 +2704,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRModeSelectClusterChangeToModeParams : NSObject @@ -2726,7 +2726,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterLockDoorParams : NSObject @@ -2748,7 +2748,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterUnlockDoorParams : NSObject @@ -2770,7 +2770,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterUnlockWithTimeoutParams : NSObject @@ -2794,7 +2794,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterSetWeekDayScheduleParams : NSObject @@ -2828,7 +2828,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterGetWeekDayScheduleParams : NSObject @@ -2852,7 +2852,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterGetWeekDayScheduleResponseParams : NSObject @@ -2888,7 +2888,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterClearWeekDayScheduleParams : NSObject @@ -2912,7 +2912,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterSetYearDayScheduleParams : NSObject @@ -2940,7 +2940,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterGetYearDayScheduleParams : NSObject @@ -2964,7 +2964,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterGetYearDayScheduleResponseParams : NSObject @@ -2994,7 +2994,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterClearYearDayScheduleParams : NSObject @@ -3018,7 +3018,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterSetHolidayScheduleParams : NSObject @@ -3046,7 +3046,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterGetHolidayScheduleParams : NSObject @@ -3068,7 +3068,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterGetHolidayScheduleResponseParams : NSObject @@ -3098,7 +3098,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterClearHolidayScheduleParams : NSObject @@ -3120,7 +3120,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterSetUserParams : NSObject @@ -3154,7 +3154,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterGetUserParams : NSObject @@ -3176,7 +3176,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterGetUserResponseParams : NSObject @@ -3216,7 +3216,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterClearUserParams : NSObject @@ -3238,7 +3238,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterSetCredentialParams : NSObject @@ -3270,7 +3270,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterSetCredentialResponseParams : NSObject @@ -3296,7 +3296,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterGetCredentialStatusParams : NSObject @@ -3318,7 +3318,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterGetCredentialStatusResponseParams : NSObject @@ -3348,7 +3348,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterClearCredentialParams : NSObject @@ -3370,7 +3370,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRWindowCoveringClusterUpOrOpenParams : NSObject /** @@ -3390,7 +3390,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRWindowCoveringClusterDownOrCloseParams : NSObject /** @@ -3410,7 +3410,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRWindowCoveringClusterStopMotionParams : NSObject /** @@ -3430,7 +3430,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRWindowCoveringClusterGoToLiftValueParams : NSObject @@ -3452,7 +3452,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRWindowCoveringClusterGoToLiftPercentageParams : NSObject @@ -3474,7 +3474,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRWindowCoveringClusterGoToTiltValueParams : NSObject @@ -3496,7 +3496,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRWindowCoveringClusterGoToTiltPercentageParams : NSObject @@ -3518,7 +3518,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBarrierControlClusterBarrierControlGoToPercentParams : NSObject @@ -3540,7 +3540,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBarrierControlClusterBarrierControlStopParams : NSObject /** @@ -3560,7 +3560,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRThermostatClusterSetpointRaiseLowerParams : NSObject @@ -3584,7 +3584,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRThermostatClusterGetWeeklyScheduleResponseParams : NSObject @@ -3612,7 +3612,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRThermostatClusterSetWeeklyScheduleParams : NSObject @@ -3640,7 +3640,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRThermostatClusterGetWeeklyScheduleParams : NSObject @@ -3664,7 +3664,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRThermostatClusterClearWeeklyScheduleParams : NSObject /** @@ -3684,7 +3684,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterMoveToHueParams : NSObject @@ -3714,7 +3714,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterMoveHueParams : NSObject @@ -3742,7 +3742,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterStepHueParams : NSObject @@ -3772,7 +3772,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterMoveToSaturationParams : NSObject @@ -3800,7 +3800,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterMoveSaturationParams : NSObject @@ -3828,7 +3828,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterStepSaturationParams : NSObject @@ -3858,7 +3858,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterMoveToHueAndSaturationParams : NSObject @@ -3888,7 +3888,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterMoveToColorParams : NSObject @@ -3918,7 +3918,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterMoveColorParams : NSObject @@ -3946,7 +3946,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterStepColorParams : NSObject @@ -3976,7 +3976,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterMoveToColorTemperatureParams : NSObject @@ -4004,7 +4004,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterEnhancedMoveToHueParams : NSObject @@ -4034,7 +4034,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterEnhancedMoveHueParams : NSObject @@ -4062,7 +4062,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterEnhancedStepHueParams : NSObject @@ -4092,7 +4092,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterEnhancedMoveToHueAndSaturationParams : NSObject @@ -4122,7 +4122,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterColorLoopSetParams : NSObject @@ -4156,7 +4156,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterStopMoveStepParams : NSObject @@ -4180,7 +4180,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterMoveColorTemperatureParams : NSObject @@ -4212,7 +4212,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRColorControlClusterStepColorTemperatureParams : NSObject @@ -4246,7 +4246,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRChannelClusterChangeChannelParams : NSObject @@ -4268,7 +4268,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRChannelClusterChangeChannelResponseParams : NSObject @@ -4292,7 +4292,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRChannelClusterChangeChannelByNumberParams : NSObject @@ -4316,7 +4316,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRChannelClusterSkipChannelParams : NSObject @@ -4338,7 +4338,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTargetNavigatorClusterNavigateTargetParams : NSObject @@ -4362,7 +4362,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTargetNavigatorClusterNavigateTargetResponseParams : NSObject @@ -4386,7 +4386,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaPlaybackClusterPlayParams : NSObject /** @@ -4406,7 +4406,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaPlaybackClusterPauseParams : NSObject /** @@ -4426,7 +4426,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaPlaybackClusterStopPlaybackParams : NSObject /** @@ -4446,7 +4446,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaPlaybackClusterStartOverParams : NSObject /** @@ -4466,7 +4466,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaPlaybackClusterPreviousParams : NSObject /** @@ -4486,7 +4486,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaPlaybackClusterNextParams : NSObject /** @@ -4506,7 +4506,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaPlaybackClusterRewindParams : NSObject /** @@ -4526,7 +4526,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaPlaybackClusterFastForwardParams : NSObject /** @@ -4546,7 +4546,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaPlaybackClusterSkipForwardParams : NSObject @@ -4568,7 +4568,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaPlaybackClusterSkipBackwardParams : NSObject @@ -4590,7 +4590,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaPlaybackClusterPlaybackResponseParams : NSObject @@ -4614,7 +4614,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaPlaybackClusterSeekParams : NSObject @@ -4636,7 +4636,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaInputClusterSelectInputParams : NSObject @@ -4658,7 +4658,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaInputClusterShowInputStatusParams : NSObject /** @@ -4678,7 +4678,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaInputClusterHideInputStatusParams : NSObject /** @@ -4698,7 +4698,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaInputClusterRenameInputParams : NSObject @@ -4722,7 +4722,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRLowPowerClusterSleepParams : NSObject /** @@ -4742,7 +4742,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRKeypadInputClusterSendKeyParams : NSObject @@ -4764,7 +4764,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRKeypadInputClusterSendKeyResponseParams : NSObject @@ -4786,7 +4786,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRContentLauncherClusterLaunchContentParams : NSObject @@ -4812,7 +4812,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRContentLauncherClusterLaunchURLParams : NSObject @@ -4838,7 +4838,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRContentLauncherClusterLaunchResponseParams : NSObject @@ -4862,7 +4862,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAudioOutputClusterSelectOutputParams : NSObject @@ -4884,7 +4884,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAudioOutputClusterRenameOutputParams : NSObject @@ -4908,7 +4908,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRApplicationLauncherClusterLaunchAppParams : NSObject @@ -4932,7 +4932,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRApplicationLauncherClusterStopAppParams : NSObject @@ -4954,7 +4954,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRApplicationLauncherClusterHideAppParams : NSObject @@ -4976,7 +4976,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRApplicationLauncherClusterLauncherResponseParams : NSObject @@ -5000,7 +5000,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAccountLoginClusterGetSetupPINParams : NSObject @@ -5022,7 +5022,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAccountLoginClusterGetSetupPINResponseParams : NSObject @@ -5044,7 +5044,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAccountLoginClusterLoginParams : NSObject @@ -5068,7 +5068,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAccountLoginClusterLogoutParams : NSObject /** @@ -5088,7 +5088,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams : NSObject @@ -5116,7 +5116,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRElectricalMeasurementClusterGetProfileInfoCommandParams : NSObject /** @@ -5136,7 +5136,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams : NSObject @@ -5168,7 +5168,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams : NSObject @@ -5194,7 +5194,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestParams : NSObject /** @@ -5214,7 +5214,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestSpecificResponseParams : NSObject @@ -5236,7 +5236,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestNotHandledParams : NSObject /** @@ -5256,7 +5256,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestAddArgumentsResponseParams : NSObject @@ -5278,7 +5278,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestSpecificParams : NSObject /** @@ -5298,7 +5298,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestSimpleArgumentResponseParams : NSObject @@ -5320,7 +5320,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestUnknownCommandParams : NSObject /** @@ -5340,7 +5340,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestStructArrayArgumentResponseParams : NSObject @@ -5372,7 +5372,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestAddArgumentsParams : NSObject @@ -5396,7 +5396,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestListInt8UReverseResponseParams : NSObject @@ -5418,7 +5418,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestSimpleArgumentRequestParams : NSObject @@ -5440,7 +5440,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestEnumsResponseParams : NSObject @@ -5464,7 +5464,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestStructArrayArgumentRequestParams : NSObject @@ -5496,7 +5496,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestNullableOptionalResponseParams : NSObject @@ -5524,7 +5524,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestStructArgumentRequestParams : NSObject @@ -5546,7 +5546,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestComplexNullableOptionalResponseParams : NSObject @@ -5622,7 +5622,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestNestedStructArgumentRequestParams : NSObject @@ -5644,7 +5644,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterBooleanResponseParams : NSObject @@ -5666,7 +5666,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestListStructArgumentRequestParams : NSObject @@ -5688,7 +5688,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterSimpleStructResponseParams : NSObject @@ -5710,7 +5710,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestListInt8UArgumentRequestParams : NSObject @@ -5732,7 +5732,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestEmitTestEventResponseParams : NSObject @@ -5754,7 +5754,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestNestedStructListArgumentRequestParams : NSObject @@ -5776,7 +5776,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams : NSObject @@ -5798,7 +5798,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestListNestedStructListArgumentRequestParams : NSObject @@ -5820,7 +5820,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestListInt8UReverseRequestParams : NSObject @@ -5842,7 +5842,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestEnumsRequestParams : NSObject @@ -5866,7 +5866,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestNullableOptionalRequestParams : NSObject @@ -5888,7 +5888,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestComplexNullableOptionalRequestParams : NSObject @@ -5932,7 +5932,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterSimpleStructEchoRequestParams : NSObject @@ -5954,7 +5954,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTimedInvokeRequestParams : NSObject /** @@ -5974,7 +5974,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams : NSObject @@ -5996,7 +5996,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestEmitTestEventRequestParams : NSObject @@ -6022,7 +6022,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams : NSObject @@ -6044,7 +6044,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRFaultInjectionClusterFailAtFaultParams : NSObject @@ -6074,7 +6074,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRFaultInjectionClusterFailRandomlyAtFaultParams : NSObject @@ -6100,7 +6100,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 926e14e675ca8f..d6f6c8e1eece18 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -30,7 +30,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRIdentifyClusterIdentifyParams alloc] init]; @@ -61,7 +61,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; @@ -93,7 +93,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterAddGroupParams alloc] init]; @@ -125,7 +125,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterAddGroupResponseParams alloc] init]; @@ -155,7 +155,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterViewGroupParams alloc] init]; @@ -187,7 +187,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterViewGroupResponseParams alloc] init]; @@ -218,7 +218,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterGetGroupMembershipParams alloc] init]; @@ -248,7 +248,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterGetGroupMembershipResponseParams alloc] init]; @@ -278,7 +278,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterRemoveGroupParams alloc] init]; @@ -308,7 +308,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterRemoveGroupResponseParams alloc] init]; @@ -336,7 +336,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterRemoveAllGroupsParams alloc] init]; @@ -365,7 +365,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterAddGroupIfIdentifyingParams alloc] init]; @@ -403,7 +403,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterAddSceneParams alloc] init]; @@ -441,7 +441,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterAddSceneResponseParams alloc] init]; @@ -474,7 +474,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterViewSceneParams alloc] init]; @@ -514,7 +514,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterViewSceneResponseParams alloc] init]; @@ -551,7 +551,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterRemoveSceneParams alloc] init]; @@ -585,7 +585,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterRemoveSceneResponseParams alloc] init]; @@ -616,7 +616,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterRemoveAllScenesParams alloc] init]; @@ -646,7 +646,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterRemoveAllScenesResponseParams alloc] init]; @@ -678,7 +678,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterStoreSceneParams alloc] init]; @@ -712,7 +712,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterStoreSceneResponseParams alloc] init]; @@ -747,7 +747,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterRecallSceneParams alloc] init]; @@ -778,7 +778,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; @@ -812,7 +812,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterGetSceneMembershipResponseParams alloc] init]; @@ -852,7 +852,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterEnhancedAddSceneParams alloc] init]; @@ -890,7 +890,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterEnhancedAddSceneResponseParams alloc] init]; @@ -923,7 +923,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterEnhancedViewSceneParams alloc] init]; @@ -963,7 +963,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterEnhancedViewSceneResponseParams alloc] init]; @@ -1006,7 +1006,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterCopySceneParams alloc] init]; @@ -1044,7 +1044,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterCopySceneResponseParams alloc] init]; @@ -1073,7 +1073,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROnOffClusterOffParams alloc] init]; @@ -1098,7 +1098,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROnOffClusterOnParams alloc] init]; @@ -1123,7 +1123,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROnOffClusterToggleParams alloc] init]; @@ -1152,7 +1152,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROnOffClusterOffWithEffectParams alloc] init]; @@ -1180,7 +1180,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROnOffClusterOnWithRecallGlobalSceneParams alloc] init]; @@ -1211,7 +1211,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROnOffClusterOnWithTimedOffParams alloc] init]; @@ -1248,7 +1248,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -1287,7 +1287,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRLevelControlClusterMoveParams alloc] init]; @@ -1327,7 +1327,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRLevelControlClusterStepParams alloc] init]; @@ -1363,7 +1363,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRLevelControlClusterStopParams alloc] init]; @@ -1399,7 +1399,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; @@ -1438,7 +1438,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; @@ -1478,7 +1478,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; @@ -1514,7 +1514,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; @@ -1544,7 +1544,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; @@ -1574,7 +1574,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRActionsClusterInstantActionParams alloc] init]; @@ -1608,7 +1608,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRActionsClusterInstantActionWithTransitionParams alloc] init]; @@ -1641,7 +1641,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRActionsClusterStartActionParams alloc] init]; @@ -1675,7 +1675,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRActionsClusterStartActionWithDurationParams alloc] init]; @@ -1708,7 +1708,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRActionsClusterStopActionParams alloc] init]; @@ -1740,7 +1740,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRActionsClusterPauseActionParams alloc] init]; @@ -1774,7 +1774,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRActionsClusterPauseActionWithDurationParams alloc] init]; @@ -1807,7 +1807,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRActionsClusterResumeActionParams alloc] init]; @@ -1839,7 +1839,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRActionsClusterEnableActionParams alloc] init]; @@ -1873,7 +1873,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRActionsClusterEnableActionWithDurationParams alloc] init]; @@ -1906,7 +1906,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRActionsClusterDisableActionParams alloc] init]; @@ -1940,7 +1940,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRActionsClusterDisableActionWithDurationParams alloc] init]; @@ -1969,7 +1969,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRBasicClusterMfgSpecificPingParams alloc] init]; @@ -2010,7 +2010,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROtaSoftwareUpdateProviderClusterQueryImageParams alloc] init]; @@ -2063,7 +2063,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams alloc] init]; @@ -2105,7 +2105,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; @@ -2138,7 +2138,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams alloc] init]; @@ -2170,7 +2170,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; @@ -2209,7 +2209,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; @@ -2246,7 +2246,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; @@ -2278,7 +2278,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGeneralCommissioningClusterArmFailSafeResponseParams alloc] init]; @@ -2312,7 +2312,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams alloc] init]; @@ -2345,7 +2345,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams alloc] init]; @@ -2373,7 +2373,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; @@ -2402,7 +2402,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteResponseParams alloc] init]; @@ -2434,7 +2434,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; @@ -2470,7 +2470,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRNetworkCommissioningClusterScanNetworksResponseParams alloc] init]; @@ -2507,7 +2507,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; @@ -2541,7 +2541,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; @@ -2574,7 +2574,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRNetworkCommissioningClusterRemoveNetworkParams alloc] init]; @@ -2609,7 +2609,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRNetworkCommissioningClusterNetworkConfigResponseParams alloc] init]; @@ -2642,7 +2642,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRNetworkCommissioningClusterConnectNetworkParams alloc] init]; @@ -2677,7 +2677,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRNetworkCommissioningClusterConnectNetworkResponseParams alloc] init]; @@ -2712,7 +2712,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRNetworkCommissioningClusterReorderNetworkParams alloc] init]; @@ -2748,7 +2748,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; @@ -2786,7 +2786,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDiagnosticLogsClusterRetrieveLogsResponseParams alloc] init]; @@ -2821,7 +2821,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; @@ -2850,7 +2850,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; @@ -2875,7 +2875,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; @@ -2900,7 +2900,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams alloc] init]; @@ -2925,7 +2925,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; @@ -2956,7 +2956,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTimeSynchronizationClusterSetUtcTimeParams alloc] init]; @@ -2995,7 +2995,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; @@ -3030,7 +3030,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; @@ -3057,7 +3057,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; @@ -3084,7 +3084,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; @@ -3115,7 +3115,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROperationalCredentialsClusterAttestationResponseParams alloc] init]; @@ -3146,7 +3146,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; @@ -3175,7 +3175,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROperationalCredentialsClusterCertificateChainResponseParams alloc] init]; @@ -3206,7 +3206,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; @@ -3239,7 +3239,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROperationalCredentialsClusterCSRResponseParams alloc] init]; @@ -3278,7 +3278,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; @@ -3316,7 +3316,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; @@ -3351,7 +3351,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROperationalCredentialsClusterNOCResponseParams alloc] init]; @@ -3382,7 +3382,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; @@ -3410,7 +3410,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; @@ -3439,7 +3439,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; @@ -3468,7 +3468,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; @@ -3497,7 +3497,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; @@ -3526,7 +3526,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupKeyManagementClusterKeySetReadResponseParams alloc] init]; @@ -3555,7 +3555,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; @@ -3584,7 +3584,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; @@ -3613,7 +3613,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams alloc] init]; @@ -3642,7 +3642,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRModeSelectClusterChangeToModeParams alloc] init]; @@ -3670,7 +3670,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterLockDoorParams alloc] init]; @@ -3699,7 +3699,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; @@ -3730,7 +3730,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; @@ -3772,7 +3772,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -3811,7 +3811,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; @@ -3855,7 +3855,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterGetWeekDayScheduleResponseParams alloc] init]; @@ -3895,7 +3895,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; @@ -3931,7 +3931,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -3966,7 +3966,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; @@ -4004,7 +4004,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterGetYearDayScheduleResponseParams alloc] init]; @@ -4040,7 +4040,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; @@ -4076,7 +4076,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; @@ -4109,7 +4109,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; @@ -4146,7 +4146,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterGetHolidayScheduleResponseParams alloc] init]; @@ -4180,7 +4180,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; @@ -4221,7 +4221,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -4259,7 +4259,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterGetUserParams alloc] init]; @@ -4305,7 +4305,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterGetUserResponseParams alloc] init]; @@ -4346,7 +4346,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterClearUserParams alloc] init]; @@ -4384,7 +4384,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -4424,7 +4424,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterSetCredentialResponseParams alloc] init]; @@ -4455,7 +4455,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -4492,7 +4492,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterGetCredentialStatusResponseParams alloc] init]; @@ -4528,7 +4528,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -4555,7 +4555,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; @@ -4580,7 +4580,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; @@ -4605,7 +4605,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; @@ -4632,7 +4632,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; @@ -4660,7 +4660,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; @@ -4689,7 +4689,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; @@ -4717,7 +4717,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; @@ -4746,7 +4746,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; @@ -4773,7 +4773,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; @@ -4802,7 +4802,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; @@ -4838,7 +4838,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRThermostatClusterGetWeeklyScheduleResponseParams alloc] init]; @@ -4877,7 +4877,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; @@ -4912,7 +4912,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; @@ -4940,7 +4940,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; @@ -4975,7 +4975,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterMoveToHueParams alloc] init]; @@ -5015,7 +5015,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterMoveHueParams alloc] init]; @@ -5055,7 +5055,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterStepHueParams alloc] init]; @@ -5095,7 +5095,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; @@ -5134,7 +5134,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterMoveSaturationParams alloc] init]; @@ -5174,7 +5174,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterStepSaturationParams alloc] init]; @@ -5216,7 +5216,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; @@ -5258,7 +5258,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -5298,7 +5298,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterMoveColorParams alloc] init]; @@ -5338,7 +5338,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterStepColorParams alloc] init]; @@ -5378,7 +5378,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; @@ -5419,7 +5419,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; @@ -5459,7 +5459,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; @@ -5499,7 +5499,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; @@ -5541,7 +5541,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; @@ -5587,7 +5587,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterColorLoopSetParams alloc] init]; @@ -5626,7 +5626,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterStopMoveStepParams alloc] init]; @@ -5666,7 +5666,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; @@ -5715,7 +5715,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; @@ -5753,7 +5753,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRChannelClusterChangeChannelParams alloc] init]; @@ -5783,7 +5783,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRChannelClusterChangeChannelResponseParams alloc] init]; @@ -5815,7 +5815,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; @@ -5845,7 +5845,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRChannelClusterSkipChannelParams alloc] init]; @@ -5875,7 +5875,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; @@ -5907,7 +5907,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTargetNavigatorClusterNavigateTargetResponseParams alloc] init]; @@ -5935,7 +5935,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaPlaybackClusterPlayParams alloc] init]; @@ -5960,7 +5960,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaPlaybackClusterPauseParams alloc] init]; @@ -5985,7 +5985,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaPlaybackClusterStopPlaybackParams alloc] init]; @@ -6010,7 +6010,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; @@ -6035,7 +6035,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaPlaybackClusterPreviousParams alloc] init]; @@ -6060,7 +6060,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaPlaybackClusterNextParams alloc] init]; @@ -6085,7 +6085,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaPlaybackClusterRewindParams alloc] init]; @@ -6110,7 +6110,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; @@ -6137,7 +6137,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; @@ -6166,7 +6166,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; @@ -6197,7 +6197,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaPlaybackClusterPlaybackResponseParams alloc] init]; @@ -6227,7 +6227,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaPlaybackClusterSeekParams alloc] init]; @@ -6255,7 +6255,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaInputClusterSelectInputParams alloc] init]; @@ -6281,7 +6281,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; @@ -6306,7 +6306,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; @@ -6335,7 +6335,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRMediaInputClusterRenameInputParams alloc] init]; @@ -6363,7 +6363,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRLowPowerClusterSleepParams alloc] init]; @@ -6390,7 +6390,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRKeypadInputClusterSendKeyParams alloc] init]; @@ -6418,7 +6418,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRKeypadInputClusterSendKeyResponseParams alloc] init]; @@ -6450,7 +6450,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; @@ -6485,7 +6485,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; @@ -6518,7 +6518,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRContentLauncherClusterLaunchResponseParams alloc] init]; @@ -6548,7 +6548,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; @@ -6578,7 +6578,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; @@ -6610,7 +6610,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; @@ -6640,7 +6640,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; @@ -6669,7 +6669,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; @@ -6700,7 +6700,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRApplicationLauncherClusterLauncherResponseParams alloc] init]; @@ -6730,7 +6730,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; @@ -6759,7 +6759,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRAccountLoginClusterGetSetupPINResponseParams alloc] init]; @@ -6789,7 +6789,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRAccountLoginClusterLoginParams alloc] init]; @@ -6817,7 +6817,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRAccountLoginClusterLogoutParams alloc] init]; @@ -6850,7 +6850,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams alloc] init]; @@ -6881,7 +6881,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams alloc] init]; @@ -6918,7 +6918,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams alloc] init]; @@ -6958,7 +6958,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams alloc] init]; @@ -6987,7 +6987,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestParams alloc] init]; @@ -7014,7 +7014,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestSpecificResponseParams alloc] init]; @@ -7041,7 +7041,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestNotHandledParams alloc] init]; @@ -7068,7 +7068,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestAddArgumentsResponseParams alloc] init]; @@ -7095,7 +7095,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestSpecificParams alloc] init]; @@ -7122,7 +7122,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestSimpleArgumentResponseParams alloc] init]; @@ -7149,7 +7149,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestUnknownCommandParams alloc] init]; @@ -7186,7 +7186,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestStructArrayArgumentResponseParams alloc] init]; @@ -7222,7 +7222,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; @@ -7252,7 +7252,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestListInt8UReverseResponseParams alloc] init]; @@ -7280,7 +7280,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestSimpleArgumentRequestParams alloc] init]; @@ -7310,7 +7310,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestEnumsResponseParams alloc] init]; @@ -7350,7 +7350,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestStructArrayArgumentRequestParams alloc] init]; @@ -7390,7 +7390,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestNullableOptionalResponseParams alloc] init]; @@ -7422,7 +7422,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestStructArgumentRequestParams alloc] init]; @@ -7504,7 +7504,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestComplexNullableOptionalResponseParams alloc] init]; @@ -7574,7 +7574,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestNestedStructArgumentRequestParams alloc] init]; @@ -7602,7 +7602,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterBooleanResponseParams alloc] init]; @@ -7630,7 +7630,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestListStructArgumentRequestParams alloc] init]; @@ -7658,7 +7658,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterSimpleStructResponseParams alloc] init]; @@ -7686,7 +7686,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestListInt8UArgumentRequestParams alloc] init]; @@ -7714,7 +7714,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestEmitTestEventResponseParams alloc] init]; @@ -7742,7 +7742,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init]; @@ -7770,7 +7770,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams alloc] init]; @@ -7798,7 +7798,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestListNestedStructListArgumentRequestParams alloc] init]; @@ -7826,7 +7826,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestListInt8UReverseRequestParams alloc] init]; @@ -7856,7 +7856,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestEnumsRequestParams alloc] init]; @@ -7886,7 +7886,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestNullableOptionalRequestParams alloc] init]; @@ -7936,7 +7936,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestComplexNullableOptionalRequestParams alloc] init]; @@ -7981,7 +7981,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterSimpleStructEchoRequestParams alloc] init]; @@ -8007,7 +8007,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTimedInvokeRequestParams alloc] init]; @@ -8034,7 +8034,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams alloc] init]; @@ -8066,7 +8066,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestEmitTestEventRequestParams alloc] init]; @@ -8097,7 +8097,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams alloc] init]; @@ -8133,7 +8133,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRFaultInjectionClusterFailAtFaultParams alloc] init]; @@ -8171,7 +8171,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRFaultInjectionClusterFailRandomlyAtFaultParams alloc] init]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index f6b630e61a3259..7634210ba131d4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull attributeValue; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRScenesClusterExtensionFieldSet : NSObject @@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull attributeValueList; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDescriptorClusterDeviceTypeStruct : NSObject @@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull revision; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBindingClusterTargetStruct : NSObject @@ -51,7 +51,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAccessControlClusterTarget : NSObject @@ -60,7 +60,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable deviceType; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAccessControlClusterAccessControlEntry : NSObject @@ -71,7 +71,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAccessControlClusterExtensionEntry : NSObject @@ -79,7 +79,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAccessControlClusterAccessControlEntryChangedEvent : NSObject @@ -90,7 +90,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAccessControlClusterAccessControlExtensionChangedEvent : NSObject @@ -101,7 +101,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterActionStruct : NSObject @@ -113,7 +113,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull state; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterEndpointListStruct : NSObject @@ -123,7 +123,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull endpoints; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterStateChangedEvent : NSObject @@ -132,7 +132,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, getter=getNewState) NSNumber * _Nonnull newState; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRActionsClusterActionFailedEvent : NSObject @@ -142,7 +142,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull error; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBasicClusterCapabilityMinimaStruct : NSObject @@ -150,34 +150,34 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull subscriptionsPerFabric; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBasicClusterStartUpEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBasicClusterShutDownEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBasicClusterLeaveEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBasicClusterReachableChangedEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull reachableNewValue; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROtaSoftwareUpdateRequestorClusterProviderLocation : NSObject @@ -186,7 +186,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent : NSObject @@ -196,7 +196,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable targetSoftwareVersion; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent : NSObject @@ -204,7 +204,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull productID; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent : NSObject @@ -214,7 +214,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable platformCode; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPowerSourceClusterBatChargeFaultChangeType : NSObject @@ -222,7 +222,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPowerSourceClusterBatFaultChangeType : NSObject @@ -230,7 +230,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPowerSourceClusterWiredFaultChangeType : NSObject @@ -238,7 +238,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGeneralCommissioningClusterBasicCommissioningInfo : NSObject @@ -246,7 +246,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull maxCumulativeFailsafeSeconds; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRNetworkCommissioningClusterNetworkInfo : NSObject @@ -254,7 +254,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull connected; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRNetworkCommissioningClusterThreadInterfaceScanResult : NSObject @@ -268,7 +268,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull lqi; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRNetworkCommissioningClusterWiFiInterfaceScanResult : NSObject @@ -280,7 +280,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull rssi; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGeneralDiagnosticsClusterNetworkInterfaceType : NSObject @@ -294,7 +294,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull type; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent : NSObject @@ -302,7 +302,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGeneralDiagnosticsClusterRadioFaultChangeEvent : NSObject @@ -310,7 +310,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGeneralDiagnosticsClusterNetworkFaultChangeEvent : NSObject @@ -318,14 +318,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGeneralDiagnosticsClusterBootReasonEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull bootReason; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRSoftwareDiagnosticsClusterThreadMetrics : NSObject @@ -336,7 +336,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable stackSize; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRSoftwareDiagnosticsClusterSoftwareFaultEvent : NSObject @@ -345,7 +345,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSData * _Nullable faultRecording; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRThreadNetworkDiagnosticsClusterNeighborTable : NSObject @@ -365,7 +365,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull isChild; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents : NSObject @@ -383,7 +383,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull channelMaskPresent; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRThreadNetworkDiagnosticsClusterRouteTable : NSObject @@ -399,7 +399,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull linkEstablished; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRThreadNetworkDiagnosticsClusterSecurityPolicy : NSObject @@ -407,14 +407,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull flags; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRThreadNetworkDiagnosticsClusterConnectionStatusEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull connectionStatus; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent : NSObject @@ -422,14 +422,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRWiFiNetworkDiagnosticsClusterDisconnectionEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull reasonCode; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent : NSObject @@ -437,14 +437,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull status; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull connectionStatus; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTimeSynchronizationClusterDstOffsetType : NSObject @@ -453,7 +453,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull validUntil; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTimeSynchronizationClusterTimeZoneType : NSObject @@ -462,68 +462,68 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nullable name; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBridgedDeviceBasicClusterStartUpEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBridgedDeviceBasicClusterShutDownEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBridgedDeviceBasicClusterLeaveEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBridgedDeviceBasicClusterReachableChangedEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull reachableNewValue; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRSwitchClusterSwitchLatchedEvent : NSObject @property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRSwitchClusterInitialPressEvent : NSObject @property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRSwitchClusterLongPressEvent : NSObject @property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRSwitchClusterShortReleaseEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull previousPosition; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRSwitchClusterLongReleaseEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull previousPosition; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRSwitchClusterMultiPressOngoingEvent : NSObject @@ -531,7 +531,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull currentNumberOfPressesCounted; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRSwitchClusterMultiPressCompleteEvent : NSObject @@ -539,7 +539,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull totalNumberOfPressesCounted; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterFabricDescriptor : NSObject @@ -551,7 +551,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTROperationalCredentialsClusterNOCStruct : NSObject @@ -560,7 +560,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupKeyManagementClusterGroupInfoMapStruct : NSObject @@ -570,7 +570,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupKeyManagementClusterGroupKeyMapStruct : NSObject @@ -579,7 +579,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRGroupKeyManagementClusterGroupKeySetStruct : NSObject @@ -593,7 +593,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable epochStartTime2; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRFixedLabelClusterLabelStruct : NSObject @@ -601,7 +601,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull value; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRUserLabelClusterLabelStruct : NSObject @@ -609,14 +609,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull value; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRBooleanStateClusterStateChangeEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull stateValue; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRModeSelectClusterSemanticTag : NSObject @@ -624,7 +624,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull value; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRModeSelectClusterModeOptionStruct : NSObject @@ -633,7 +633,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull semanticTags; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterDlCredential : NSObject @@ -641,21 +641,21 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull credentialIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterDoorLockAlarmEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull alarmCode; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterDoorStateChangeEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull doorState; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterLockOperationEvent : NSObject @@ -667,7 +667,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nullable credentials; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterLockOperationErrorEvent : NSObject @@ -680,7 +680,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nullable credentials; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRDoorLockClusterLockUserChangeEvent : NSObject @@ -693,109 +693,109 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable dataIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterSystemPressureLowEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterSystemPressureHighEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterDryRunningEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterPumpBlockedEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterSensorFailureEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterGeneralFaultEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterLeakageEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterAirDetectionEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRPumpConfigurationAndControlClusterTurbineOperationEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRThermostatClusterThermostatScheduleTransition : NSObject @@ -804,7 +804,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable coolSetpoint; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRChannelClusterChannelInfo : NSObject @@ -815,7 +815,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nullable affiliateCallSign; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRChannelClusterLineupInfo : NSObject @@ -825,7 +825,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull lineupInfoType; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTargetNavigatorClusterTargetInfo : NSObject @@ -833,7 +833,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull name; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaPlaybackClusterPlaybackPosition : NSObject @@ -841,7 +841,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable position; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRMediaInputClusterInputInfo : NSObject @@ -851,7 +851,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull descriptionString; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRContentLauncherClusterDimension : NSObject @@ -860,7 +860,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull metric; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRContentLauncherClusterAdditionalInfo : NSObject @@ -868,7 +868,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull value; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRContentLauncherClusterParameter : NSObject @@ -877,14 +877,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nullable externalIDList; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRContentLauncherClusterContentSearch : NSObject @property (nonatomic, copy) NSArray * _Nonnull parameterList; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRContentLauncherClusterStyleInformation : NSObject @@ -893,7 +893,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) MTRContentLauncherClusterDimension * _Nullable size; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRContentLauncherClusterBrandingInformation : NSObject @@ -905,7 +905,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) MTRContentLauncherClusterStyleInformation * _Nullable waterMark; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRAudioOutputClusterOutputInfo : NSObject @@ -914,7 +914,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull name; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRApplicationLauncherClusterApplication : NSObject @@ -922,7 +922,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull applicationId; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRApplicationLauncherClusterApplicationEP : NSObject @@ -930,7 +930,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable endpoint; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRApplicationBasicClusterApplicationBasicApplication : NSObject @@ -938,7 +938,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull applicationId; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterSimpleStruct : NSObject @@ -952,7 +952,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull h; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestFabricScoped : NSObject @@ -966,7 +966,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterNullablesAndOptionalsStruct : NSObject @@ -984,7 +984,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nullable nullableOptionalList; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterNestedStruct : NSObject @@ -993,7 +993,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull c; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterNestedStructList : NSObject @@ -1006,14 +1006,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull g; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterDoubleNestedStructList : NSObject @property (nonatomic, copy) NSArray * _Nonnull a; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestListStructOctet : NSObject @@ -1021,7 +1021,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSData * _Nonnull member2; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestEventEvent : NSObject @@ -1033,14 +1033,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull arg6; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end @interface MTRTestClusterClusterTestFabricScopedEventEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(nullable NSZone *)zone; +- (id)copyWithZone:(NSZone * _Nullable)zone; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 1a3245b949d6d2..3a32fd455d1915 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -31,7 +31,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRScenesClusterAttributeValuePair alloc] init]; @@ -62,7 +62,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRScenesClusterExtensionFieldSet alloc] init]; @@ -93,7 +93,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRDescriptorClusterDeviceTypeStruct alloc] init]; @@ -130,7 +130,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRBindingClusterTargetStruct alloc] init]; @@ -166,7 +166,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRAccessControlClusterTarget alloc] init]; @@ -204,7 +204,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRAccessControlClusterAccessControlEntry alloc] init]; @@ -239,7 +239,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRAccessControlClusterExtensionEntry alloc] init]; @@ -276,7 +276,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRAccessControlClusterAccessControlEntryChangedEvent alloc] init]; @@ -317,7 +317,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRAccessControlClusterAccessControlExtensionChangedEvent alloc] init]; @@ -360,7 +360,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRActionsClusterActionStruct alloc] init]; @@ -400,7 +400,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRActionsClusterEndpointListStruct alloc] init]; @@ -435,7 +435,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRActionsClusterStateChangedEvent alloc] init]; @@ -471,7 +471,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRActionsClusterActionFailedEvent alloc] init]; @@ -504,7 +504,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRBasicClusterCapabilityMinimaStruct alloc] init]; @@ -533,7 +533,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRBasicClusterStartUpEvent alloc] init]; @@ -559,7 +559,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRBasicClusterShutDownEvent alloc] init]; @@ -584,7 +584,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRBasicClusterLeaveEvent alloc] init]; @@ -612,7 +612,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRBasicClusterReachableChangedEvent alloc] init]; @@ -644,7 +644,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTROtaSoftwareUpdateRequestorClusterProviderLocation alloc] init]; @@ -680,7 +680,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent alloc] init]; @@ -714,7 +714,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent alloc] init]; @@ -749,7 +749,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent alloc] init]; @@ -783,7 +783,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPowerSourceClusterBatChargeFaultChangeType alloc] init]; @@ -814,7 +814,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPowerSourceClusterBatFaultChangeType alloc] init]; @@ -845,7 +845,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPowerSourceClusterWiredFaultChangeType alloc] init]; @@ -876,7 +876,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRGeneralCommissioningClusterBasicCommissioningInfo alloc] init]; @@ -908,7 +908,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRNetworkCommissioningClusterNetworkInfo alloc] init]; @@ -952,7 +952,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRNetworkCommissioningClusterThreadInterfaceScanResult alloc] init]; @@ -1000,7 +1000,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRNetworkCommissioningClusterWiFiInterfaceScanResult alloc] init]; @@ -1049,7 +1049,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRGeneralDiagnosticsClusterNetworkInterfaceType alloc] init]; @@ -1089,7 +1089,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent alloc] init]; @@ -1120,7 +1120,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRGeneralDiagnosticsClusterRadioFaultChangeEvent alloc] init]; @@ -1151,7 +1151,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRGeneralDiagnosticsClusterNetworkFaultChangeEvent alloc] init]; @@ -1180,7 +1180,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRGeneralDiagnosticsClusterBootReasonEvent alloc] init]; @@ -1216,7 +1216,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRSoftwareDiagnosticsClusterThreadMetrics alloc] init]; @@ -1253,7 +1253,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRSoftwareDiagnosticsClusterSoftwareFaultEvent alloc] init]; @@ -1310,7 +1310,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRThreadNetworkDiagnosticsClusterNeighborTable alloc] init]; @@ -1377,7 +1377,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents alloc] init]; @@ -1439,7 +1439,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRThreadNetworkDiagnosticsClusterRouteTable alloc] init]; @@ -1481,7 +1481,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRThreadNetworkDiagnosticsClusterSecurityPolicy alloc] init]; @@ -1510,7 +1510,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRThreadNetworkDiagnosticsClusterConnectionStatusEvent alloc] init]; @@ -1540,7 +1540,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent alloc] init]; @@ -1569,7 +1569,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRWiFiNetworkDiagnosticsClusterDisconnectionEvent alloc] init]; @@ -1599,7 +1599,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent alloc] init]; @@ -1628,7 +1628,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent alloc] init]; @@ -1660,7 +1660,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRTimeSynchronizationClusterDstOffsetType alloc] init]; @@ -1694,7 +1694,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRTimeSynchronizationClusterTimeZoneType alloc] init]; @@ -1724,7 +1724,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRBridgedDeviceBasicClusterStartUpEvent alloc] init]; @@ -1750,7 +1750,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRBridgedDeviceBasicClusterShutDownEvent alloc] init]; @@ -1773,7 +1773,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRBridgedDeviceBasicClusterLeaveEvent alloc] init]; @@ -1798,7 +1798,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRBridgedDeviceBasicClusterReachableChangedEvent alloc] init]; @@ -1826,7 +1826,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRSwitchClusterSwitchLatchedEvent alloc] init]; @@ -1854,7 +1854,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRSwitchClusterInitialPressEvent alloc] init]; @@ -1882,7 +1882,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRSwitchClusterLongPressEvent alloc] init]; @@ -1910,7 +1910,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRSwitchClusterShortReleaseEvent alloc] init]; @@ -1938,7 +1938,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRSwitchClusterLongReleaseEvent alloc] init]; @@ -1968,7 +1968,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRSwitchClusterMultiPressOngoingEvent alloc] init]; @@ -1999,7 +1999,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRSwitchClusterMultiPressCompleteEvent alloc] init]; @@ -2038,7 +2038,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTROperationalCredentialsClusterFabricDescriptor alloc] init]; @@ -2077,7 +2077,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTROperationalCredentialsClusterNOCStruct alloc] init]; @@ -2114,7 +2114,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRGroupKeyManagementClusterGroupInfoMapStruct alloc] init]; @@ -2149,7 +2149,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; @@ -2193,7 +2193,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; @@ -2234,7 +2234,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRFixedLabelClusterLabelStruct alloc] init]; @@ -2265,7 +2265,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRUserLabelClusterLabelStruct alloc] init]; @@ -2294,7 +2294,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRBooleanStateClusterStateChangeEvent alloc] init]; @@ -2324,7 +2324,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRModeSelectClusterSemanticTag alloc] init]; @@ -2357,7 +2357,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRModeSelectClusterModeOptionStruct alloc] init]; @@ -2389,7 +2389,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRDoorLockClusterDlCredential alloc] init]; @@ -2418,7 +2418,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRDoorLockClusterDoorLockAlarmEvent alloc] init]; @@ -2445,7 +2445,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRDoorLockClusterDoorStateChangeEvent alloc] init]; @@ -2482,7 +2482,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRDoorLockClusterLockOperationEvent alloc] init]; @@ -2529,7 +2529,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRDoorLockClusterLockOperationErrorEvent alloc] init]; @@ -2577,7 +2577,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRDoorLockClusterLockUserChangeEvent alloc] init]; @@ -2611,7 +2611,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent alloc] init]; @@ -2634,7 +2634,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent alloc] init]; @@ -2657,7 +2657,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent alloc] init]; @@ -2680,7 +2680,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterSystemPressureLowEvent alloc] init]; @@ -2703,7 +2703,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterSystemPressureHighEvent alloc] init]; @@ -2726,7 +2726,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterDryRunningEvent alloc] init]; @@ -2749,7 +2749,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent alloc] init]; @@ -2772,7 +2772,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent alloc] init]; @@ -2795,7 +2795,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent alloc] init]; @@ -2818,7 +2818,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterPumpBlockedEvent alloc] init]; @@ -2841,7 +2841,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterSensorFailureEvent alloc] init]; @@ -2864,7 +2864,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent alloc] init]; @@ -2887,7 +2887,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent alloc] init]; @@ -2910,7 +2910,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterGeneralFaultEvent alloc] init]; @@ -2933,7 +2933,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterLeakageEvent alloc] init]; @@ -2956,7 +2956,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterAirDetectionEvent alloc] init]; @@ -2979,7 +2979,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRPumpConfigurationAndControlClusterTurbineOperationEvent alloc] init]; @@ -3008,7 +3008,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRThermostatClusterThermostatScheduleTransition alloc] init]; @@ -3046,7 +3046,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRChannelClusterChannelInfo alloc] init]; @@ -3085,7 +3085,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRChannelClusterLineupInfo alloc] init]; @@ -3119,7 +3119,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRTargetNavigatorClusterTargetInfo alloc] init]; @@ -3150,7 +3150,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRMediaPlaybackClusterPlaybackPosition alloc] init]; @@ -3185,7 +3185,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRMediaInputClusterInputInfo alloc] init]; @@ -3220,7 +3220,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRContentLauncherClusterDimension alloc] init]; @@ -3252,7 +3252,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRContentLauncherClusterAdditionalInfo alloc] init]; @@ -3285,7 +3285,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRContentLauncherClusterParameter alloc] init]; @@ -3315,7 +3315,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRContentLauncherClusterContentSearch alloc] init]; @@ -3347,7 +3347,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRContentLauncherClusterStyleInformation alloc] init]; @@ -3387,7 +3387,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRContentLauncherClusterBrandingInformation alloc] init]; @@ -3425,7 +3425,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRAudioOutputClusterOutputInfo alloc] init]; @@ -3457,7 +3457,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRApplicationLauncherClusterApplication alloc] init]; @@ -3488,7 +3488,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRApplicationLauncherClusterApplicationEP alloc] init]; @@ -3519,7 +3519,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRApplicationBasicClusterApplicationBasicApplication alloc] init]; @@ -3562,7 +3562,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRTestClusterClusterSimpleStruct alloc] init]; @@ -3612,7 +3612,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRTestClusterClusterTestFabricScoped alloc] init]; @@ -3674,7 +3674,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRTestClusterClusterNullablesAndOptionalsStruct alloc] init]; @@ -3722,7 +3722,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRTestClusterClusterNestedStruct alloc] init]; @@ -3764,7 +3764,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRTestClusterClusterNestedStructList alloc] init]; @@ -3798,7 +3798,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRTestClusterClusterDoubleNestedStructList alloc] init]; @@ -3827,7 +3827,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRTestClusterClusterTestListStructOctet alloc] init]; @@ -3866,7 +3866,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRTestClusterClusterTestEventEvent alloc] init]; @@ -3899,7 +3899,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(nullable NSZone *)zone +- (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRTestClusterClusterTestFabricScopedEventEvent alloc] init]; diff --git a/src/darwin/Framework/CHIPTests/MTRCertificateTests.m b/src/darwin/Framework/CHIPTests/MTRCertificateTests.m index 3ec2b9662bef0a..e42ea141a1c987 100644 --- a/src/darwin/Framework/CHIPTests/MTRCertificateTests.m +++ b/src/darwin/Framework/CHIPTests/MTRCertificateTests.m @@ -32,7 +32,7 @@ - (void)testGenerateRootCert __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * rootCert = [MTRCertificates generateRootCertificate:testKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * rootCert = [MTRCertificates createRootCertificate:testKeys issuerID:nil fabricID:nil error:nil]; XCTAssertNotNil(rootCert); } @@ -41,18 +41,18 @@ - (void)testGenerateIntermediateCert __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * rootCert = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * rootCert = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; XCTAssertNotNil(rootCert); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediateCert = [MTRCertificates generateIntermediateCertificate:rootKeys - rootCertificate:rootCert - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediateCert = [MTRCertificates createIntermediateCertificate:rootKeys + rootCertificate:rootCert + intermediatePublicKey:intermediateKeys.publicKey + issuerID:nil + fabricID:nil + error:nil]; XCTAssertNotNil(intermediateCert); } @@ -61,7 +61,7 @@ - (void)testGenerateOperationalCertNoIntermediate __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * rootCert = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * rootCert = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; XCTAssertNotNil(rootCert); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; @@ -73,13 +73,13 @@ - (void)testGenerateOperationalCertNoIntermediate [cats addObject:@0x00020001]; [cats addObject:@0x0003FFFF]; - __auto_type * operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:cats - error:nil]; + __auto_type * operationalCert = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricID:@1 + nodeID:@1 + caseAuthenticatedTags:cats + error:nil]; XCTAssertNotNil(operationalCert); } @@ -88,30 +88,30 @@ - (void)testGenerateOperationalCertWithIntermediate __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * rootCert = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * rootCert = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; XCTAssertNotNil(rootCert); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediateCert = [MTRCertificates generateIntermediateCertificate:rootKeys - rootCertificate:rootCert - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediateCert = [MTRCertificates createIntermediateCertificate:rootKeys + rootCertificate:rootCert + intermediatePublicKey:intermediateKeys.publicKey + issuerID:nil + fabricID:nil + error:nil]; XCTAssertNotNil(intermediateCert); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * operationalCert = [MTRCertificates generateOperationalCertificate:intermediateKeys - signingCertificate:intermediateCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:nil - error:nil]; + __auto_type * operationalCert = [MTRCertificates createOperationalCertificate:intermediateKeys + signingCertificate:intermediateCert + operationalPublicKey:operationalKeys.publicKey + fabricID:@1 + nodeID:@1 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNotNil(operationalCert); } @@ -120,7 +120,7 @@ - (void)testGenerateOperationalCertErrorCases __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * rootCert = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * rootCert = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; XCTAssertNotNil(rootCert); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; @@ -150,93 +150,93 @@ - (void)testGenerateOperationalCertErrorCases [catsWithInvalidVersion addObject:@0x00020000]; // Check basic case works - __auto_type * operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:nil - error:nil]; + __auto_type * operationalCert = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricID:@1 + nodeID:@1 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNotNil(operationalCert); // CATs too long - operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:longCats - error:nil]; + operationalCert = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricID:@1 + nodeID:@1 + caseAuthenticatedTags:longCats + error:nil]; XCTAssertNil(operationalCert); // Multiple CATs with the same identifier but different versions - operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:catsWithSameIdentifier - error:nil]; + operationalCert = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricID:@1 + nodeID:@1 + caseAuthenticatedTags:catsWithSameIdentifier + error:nil]; XCTAssertNil(operationalCert); // Multiple CATs with the same identifier and same version - operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:catsWithDuplicatedCAT - error:nil]; + operationalCert = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricID:@1 + nodeID:@1 + caseAuthenticatedTags:catsWithDuplicatedCAT + error:nil]; XCTAssertNil(operationalCert); // CAT with invalid version - operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:catsWithInvalidVersion - error:nil]; + operationalCert = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricID:@1 + nodeID:@1 + caseAuthenticatedTags:catsWithInvalidVersion + error:nil]; XCTAssertNil(operationalCert); // Signing key mismatch - operationalCert = [MTRCertificates generateOperationalCertificate:operationalKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:nil - error:nil]; + operationalCert = [MTRCertificates createOperationalCertificate:operationalKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricID:@1 + nodeID:@1 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNil(operationalCert); // Invalid fabric id - operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@0 - nodeID:@1 - caseAuthenticatedTags:nil - error:nil]; + operationalCert = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricID:@0 + nodeID:@1 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNil(operationalCert); // Undefined node id - operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@0 - caseAuthenticatedTags:nil - error:nil]; + operationalCert = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricID:@1 + nodeID:@0 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNil(operationalCert); // Non-operational node id - operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@(0xFFFFFFFFFFFFFFFFLLU) - caseAuthenticatedTags:nil - error:nil]; + operationalCert = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricID:@1 + nodeID:@(0xFFFFFFFFFFFFFFFFLLU) + caseAuthenticatedTags:nil + error:nil]; XCTAssertNil(operationalCert); } @@ -245,7 +245,7 @@ - (void)testGenerateCSR __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * csr = [MTRCertificates generateCertificateSigningRequest:testKeys error:nil]; + __auto_type * csr = [MTRCertificates createCertificateSigningRequest:testKeys error:nil]; XCTAssertNotNil(csr); // Wish there was something we could test here about the CSR. diff --git a/src/darwin/Framework/CHIPTests/MTRControllerTests.m b/src/darwin/Framework/CHIPTests/MTRControllerTests.m index 748e473bd71616..f118d429ca8ac2 100644 --- a/src/darwin/Framework/CHIPTests/MTRControllerTests.m +++ b/src/darwin/Framework/CHIPTests/MTRControllerTests.m @@ -37,47 +37,45 @@ @implementation MTRControllerTests - (void)testFactoryLifecycle { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); XCTAssertFalse([factory isRunning]); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); // Now try to restart the factory. - XCTAssertTrue([factory startup:factoryParams]); + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerLifecycle { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(1) - ipk:testKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -85,7 +83,7 @@ - (void)testControllerLifecycle XCTAssertFalse([controller isRunning]); // now try to restart the controller - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -94,193 +92,176 @@ - (void)testControllerLifecycle // now try to restart the controller without providing a vendor id. params.vendorID = nil; - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testFactoryShutdownShutsDownController { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(1) - ipk:testKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); XCTAssertFalse([controller isRunning]); } - (void)testControllerMultipleShutdown { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(1) - ipk:testKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertTrue([controller isRunning]); for (int i = 0; i < 5; i++) { [controller shutdown]; XCTAssertFalse([controller isRunning]); } - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerWithOTAProviderDelegate { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * otaProvider = [[MTRTestOTAProvider alloc] init]; __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; factoryParams.otaProviderDelegate = otaProvider; - XCTAssertTrue([factory startup:factoryParams]); + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(1) - ipk:testKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertTrue([controller isRunning]); [controller shutdown]; // OTA Provider depends on the system state maintained by CHIPDeviceControllerFactory that is destroyed when // the controller count goes down to 0. Make sure that a new controller can still be started successfully onto the // same fabric. - MTRDeviceController * controller2 = [factory startControllerOnExistingFabric:params]; + MTRDeviceController * controller2 = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertTrue([controller2 isRunning]); [controller2 shutdown]; // Check that a new controller can be started on a different fabric too. - __auto_type * params2 = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(2) - ipk:testKeys.ipk]; + __auto_type * params2 = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(2) nocSigner:testKeys]; XCTAssertNotNil(params2); params2.vendorID = @(kTestVendorId); - MTRDeviceController * controller3 = [factory startControllerOnNewFabric:params2]; + MTRDeviceController * controller3 = [factory createControllerOnNewFabric:params2 error:nil]; XCTAssertTrue([controller3 isRunning]); [controller3 shutdown]; // Stop the factory, start it up again and create a controller to ensure that no dead state from the previous // ota provider delegate is staying around. - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); - XCTAssertTrue([factory startup:factoryParams]); + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); - MTRDeviceController * controller4 = [factory startControllerOnExistingFabric:params2]; + MTRDeviceController * controller4 = [factory createControllerOnExistingFabric:params2 error:nil]; XCTAssertTrue([controller4 isRunning]); [controller4 shutdown]; - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerInvalidAccess { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(1) - ipk:testKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertTrue([controller isRunning]); [controller shutdown]; XCTAssertFalse([controller isRunning]); - XCTAssertFalse([controller getBaseDevice:1234 - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable chipDevice, NSError * _Nullable error) { - XCTAssertEqual(error.code, MTRErrorCodeInvalidState); - }]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerNewFabricMatchesOldFabric { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(1) - ipk:testKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -289,88 +270,82 @@ - (void)testControllerNewFabricMatchesOldFabric // now try to start a new controller on a new fabric but using the // same params; this should fail. - XCTAssertNil([factory startControllerOnNewFabric:params]); + XCTAssertNil([factory createControllerOnNewFabric:params error:nil]); XCTAssertFalse([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerExistingFabricMatchesRunningController { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(1) - ipk:testKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); // Now try to start a new controller on the same fabric. This should fail. - XCTAssertNil([factory startControllerOnExistingFabric:params]); + XCTAssertNil([factory createControllerOnExistingFabric:params error:nil]); XCTAssertTrue([controller isRunning]); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartControllersOnTwoFabricIds { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params1 = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(1) - ipk:testKeys.ipk]; + __auto_type * params1 = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; XCTAssertNotNil(params1); params1.vendorID = @(kTestVendorId); - MTRDeviceController * controller1 = [factory startControllerOnNewFabric:params1]; + MTRDeviceController * controller1 = [factory createControllerOnNewFabric:params1 error:nil]; XCTAssertNotNil(controller1); XCTAssertTrue([controller1 isRunning]); // Now try to start a new controller with the same root but a // different fabric id. - __auto_type * params2 = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(2) - ipk:testKeys.ipk]; + __auto_type * params2 = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(2) nocSigner:testKeys]; XCTAssertNotNil(params2); params2.vendorID = @(kTestVendorId); - MTRDeviceController * controller2 = [factory startControllerOnNewFabric:params2]; + MTRDeviceController * controller2 = [factory createControllerOnNewFabric:params2 error:nil]; XCTAssertNotNil(controller2); XCTAssertTrue([controller2 isRunning]); - XCTAssertNil([factory startControllerOnExistingFabric:params2]); + XCTAssertNil([factory createControllerOnExistingFabric:params2 error:nil]); [controller1 shutdown]; XCTAssertFalse([controller1 isRunning]); @@ -378,41 +353,39 @@ - (void)testControllerStartControllersOnTwoFabricIds [controller2 shutdown]; XCTAssertFalse([controller2 isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartControllerSameFabricWrongSubject { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * root1 = [MTRCertificates generateRootCertificate:testKeys issuerID:@1 fabricID:@1 error:nil]; + __auto_type * root1 = [MTRCertificates createRootCertificate:testKeys issuerID:@1 fabricID:@1 error:nil]; XCTAssertNotNil(root1); - __auto_type * root2 = [MTRCertificates generateRootCertificate:testKeys issuerID:@1 fabricID:@1 error:nil]; + __auto_type * root2 = [MTRCertificates createRootCertificate:testKeys issuerID:@1 fabricID:@1 error:nil]; XCTAssertNotNil(root2); - __auto_type * root3 = [MTRCertificates generateRootCertificate:testKeys issuerID:@2 fabricID:@1 error:nil]; + __auto_type * root3 = [MTRCertificates createRootCertificate:testKeys issuerID:@2 fabricID:@1 error:nil]; XCTAssertNotNil(root3); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(1) - ipk:testKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); params.rootCertificate = root1; - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -422,7 +395,7 @@ - (void)testControllerStartControllerSameFabricWrongSubject // Now try to start a new controller on the same fabric with what should be // a compatible root certificate. params.rootCertificate = root2; - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -436,7 +409,7 @@ - (void)testControllerStartControllerSameFabricWrongSubject // reasons, including our existing operational certificate not matching this // root. params.rootCertificate = root3; - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNil(controller); // Now try to start a new controller on the same fabric but with a root @@ -445,47 +418,45 @@ - (void)testControllerStartControllerSameFabricWrongSubject // the fabric would change if we allowed this. params.rootCertificate = root3; params.nodeID = nodeId; - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNil(controller); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerFabricIdRootCertMismatch { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * root1 = [MTRCertificates generateRootCertificate:testKeys issuerID:@1 fabricID:@1 error:nil]; + __auto_type * root1 = [MTRCertificates createRootCertificate:testKeys issuerID:@1 fabricID:@1 error:nil]; XCTAssertNotNil(root1); - __auto_type * root2 = [MTRCertificates generateRootCertificate:testKeys issuerID:@1 fabricID:@2 error:nil]; + __auto_type * root2 = [MTRCertificates createRootCertificate:testKeys issuerID:@1 fabricID:@2 error:nil]; XCTAssertNotNil(root2); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(1) - ipk:testKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); // Try to start controller when fabric id in root cert subject does not match provided fabric id. params.rootCertificate = root2; - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNil(controller); // Start controller when the fabric ids do match. params.rootCertificate = root1; - controller = [factory startControllerOnNewFabric:params]; + controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -493,7 +464,7 @@ - (void)testControllerFabricIdRootCertMismatch XCTAssertFalse([controller isRunning]); // Re-start controller on the new fabric. - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -503,21 +474,21 @@ - (void)testControllerFabricIdRootCertMismatch // Now try to restart controller on the fabric, but with the wrong fabric id // in the root cert. params.rootCertificate = root2; - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNil(controller); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerSignerDoesNotMatchRoot { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; @@ -526,12 +497,10 @@ - (void)testControllerSignerDoesNotMatchRoot __auto_type * signerKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(signerKeys); - __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; XCTAssertNotNil(root); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:signerKeys - fabricID:@(1) - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:signerKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); @@ -539,43 +508,41 @@ - (void)testControllerSignerDoesNotMatchRoot // Try to start controller when there is no ICA and root cert does not match signing key. params.rootCertificate = root; - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNil(controller); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerSignerKeyWithIntermediate { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediate = [MTRCertificates generateIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate = [MTRCertificates createIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys.publicKey + issuerID:nil + fabricID:nil + error:nil]; XCTAssertNotNil(intermediate); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys - fabricID:@(1) - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); @@ -583,97 +550,91 @@ - (void)testControllerSignerKeyWithIntermediate // Try to start controller when there is an ICA and the ICA cert does not match signing key. params.rootCertificate = root; params.intermediateCertificate = intermediate; - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNil(controller); // Now start controller with the signing key matching the intermediate cert. - params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:intermediateKeys fabricID:@(1) ipk:rootKeys.ipk]; + params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:intermediateKeys]; params.vendorID = @(kTestVendorId); params.rootCertificate = root; params.intermediateCertificate = intermediate; - controller = [factory startControllerOnNewFabric:params]; + controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartupParamsInvalidFabric { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); // Invalid fabric ID. - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys - fabricID:@(0) - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(0) nocSigner:rootKeys]; XCTAssertNil(params); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartupParamsInvalidVendor { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys - fabricID:@(1) - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; XCTAssertNotNil(params); // Invalid vendor ID ("standard"). params.vendorID = @(0); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNil(controller); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartupNodeIdPreserved { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys - fabricID:@(1) - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -682,7 +643,7 @@ - (void)testControllerStartupNodeIdPreserved [controller shutdown]; XCTAssertFalse([controller isRunning]); - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -691,33 +652,31 @@ - (void)testControllerStartupNodeIdPreserved [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartupNodeIdUsed { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys - fabricID:@(1) - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); // Bring up with node id 17. params.nodeID = @17; - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -728,7 +687,7 @@ - (void)testControllerStartupNodeIdUsed // Bring up with a different node id (18). params.nodeID = @18; - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -739,7 +698,7 @@ - (void)testControllerStartupNodeIdUsed // Verify the new node id has been stored. params.nodeID = nil; - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -748,43 +707,41 @@ - (void)testControllerStartupNodeIdUsed [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartupNodeIdValidation { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys - fabricID:@(1) - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); // Try to bring up with node id 0. params.nodeID = @0; - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNil(controller); // Try to bring up with node id that is outside of the operational range. params.nodeID = @(0xFFFFFFFF00000000ULL); - controller = [factory startControllerOnNewFabric:params]; + controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNil(controller); // Verify that we can indeed bring up a controller for this fabric, with a valid node id. params.nodeID = @17; - controller = [factory startControllerOnNewFabric:params]; + controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -793,48 +750,46 @@ - (void)testControllerStartupNodeIdValidation [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerRotateToICA { // Tests that we can switch a fabric from not using an ICA to using an ICA. - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediate = [MTRCertificates generateIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate = [MTRCertificates createIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys.publicKey + issuerID:nil + fabricID:nil + error:nil]; XCTAssertNotNil(intermediate); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys - fabricID:@(1) - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); // Create a new fabric without the ICA. params.rootCertificate = root; - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -844,11 +799,11 @@ - (void)testControllerRotateToICA XCTAssertFalse([controller isRunning]); // Now start controller on the same fabric but using the ICA. - params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:intermediateKeys fabricID:@(1) ipk:rootKeys.ipk]; + params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:intermediateKeys]; params.vendorID = @(kTestVendorId); params.rootCertificate = root; params.intermediateCertificate = intermediate; - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -857,41 +812,41 @@ - (void)testControllerRotateToICA [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerRotateFromICA { // Tests that we can switch a fabric from using an ICA to not using an ICA. - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediate = [MTRCertificates generateIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate = [MTRCertificates createIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys.publicKey + issuerID:nil + fabricID:nil + error:nil]; XCTAssertNotNil(intermediate); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:intermediateKeys - fabricID:@(1) - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk + fabricID:@(1) + nocSigner:intermediateKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); @@ -899,7 +854,7 @@ - (void)testControllerRotateFromICA // Create a new fabric without the ICA. params.rootCertificate = root; params.intermediateCertificate = intermediate; - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -909,10 +864,10 @@ - (void)testControllerRotateFromICA XCTAssertFalse([controller isRunning]); // Now start controller on the same fabric but without using the ICA. - params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys fabricID:@(1) ipk:rootKeys.ipk]; + params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; params.vendorID = @(kTestVendorId); params.rootCertificate = root; - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -921,52 +876,52 @@ - (void)testControllerRotateFromICA [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerRotateICA { // Tests that we can change the ICA being used for a fabric. - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys1 = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys1); - __auto_type * intermediate1 = [MTRCertificates generateIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys1.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate1 = [MTRCertificates createIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys1.publicKey + issuerID:nil + fabricID:nil + error:nil]; XCTAssertNotNil(intermediate1); __auto_type * intermediateKeys2 = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys2); - __auto_type * intermediate2 = [MTRCertificates generateIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys2.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate2 = [MTRCertificates createIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys2.publicKey + issuerID:nil + fabricID:nil + error:nil]; XCTAssertNotNil(intermediate2); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:intermediateKeys1 - fabricID:@(1) - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk + fabricID:@(1) + nocSigner:intermediateKeys1]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); @@ -974,7 +929,7 @@ - (void)testControllerRotateICA // Create a new fabric without the first ICA. params.rootCertificate = root; params.intermediateCertificate = intermediate1; - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -984,11 +939,11 @@ - (void)testControllerRotateICA XCTAssertFalse([controller isRunning]); // Now start controller on the same fabric but using the second ICA. - params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:intermediateKeys2 fabricID:@(1) ipk:rootKeys.ipk]; + params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:intermediateKeys2]; params.vendorID = @(kTestVendorId); params.rootCertificate = root; params.intermediateCertificate = intermediate2; - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -997,102 +952,102 @@ - (void)testControllerRotateICA [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerICAWithoutRoot { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediate = [MTRCertificates generateIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate = [MTRCertificates createIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys.publicKey + issuerID:nil + fabricID:nil + error:nil]; XCTAssertNotNil(intermediate); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:intermediateKeys - fabricID:@(1) - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk + fabricID:@(1) + nocSigner:intermediateKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); // Pass in an intermediate but no root. Should fail. params.intermediateCertificate = intermediate; - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNil(controller); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerProvideFullCertChain { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediate = [MTRCertificates generateIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate = [MTRCertificates createIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys.publicKey + issuerID:nil + fabricID:nil + error:nil]; XCTAssertNotNil(intermediate); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * operational = [MTRCertificates generateOperationalCertificate:intermediateKeys - signingCertificate:intermediate - operationalPublicKey:operationalKeys.publicKey - fabricID:@123 - nodeID:@456 - caseAuthenticatedTags:nil - error:nil]; + __auto_type * operational = [MTRCertificates createOperationalCertificate:intermediateKeys + signingCertificate:intermediate + operationalPublicKey:operationalKeys.publicKey + fabricID:@123 + nodeID:@456 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNotNil(operational); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithOperationalKeypair:operationalKeys - operationalCertificate:operational - intermediateCertificate:intermediate - rootCertificate:root - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk + operationalKeypair:operationalKeys + operationalCertificate:operational + intermediateCertificate:intermediate + rootCertificate:root]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -1102,11 +1057,11 @@ - (void)testControllerProvideFullCertChain XCTAssertFalse([controller isRunning]); // Trying to bring up another new fabric with the same root and NOC should fail. - controller = [factory startControllerOnNewFabric:params]; + controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNil(controller); // Trying to bring up the same fabric should succeed. - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -1115,48 +1070,48 @@ - (void)testControllerProvideFullCertChain [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerProvideCertChainNoICA { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; XCTAssertNotNil(root); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * operational = [MTRCertificates generateOperationalCertificate:rootKeys - signingCertificate:root - operationalPublicKey:operationalKeys.publicKey - fabricID:@123 - nodeID:@456 - caseAuthenticatedTags:nil - error:nil]; + __auto_type * operational = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:root + operationalPublicKey:operationalKeys.publicKey + fabricID:@123 + nodeID:@456 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNotNil(operational); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithOperationalKeypair:operationalKeys - operationalCertificate:operational - intermediateCertificate:nil - rootCertificate:root - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk + operationalKeypair:operationalKeys + operationalCertificate:operational + intermediateCertificate:nil + rootCertificate:root]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -1165,117 +1120,117 @@ - (void)testControllerProvideCertChainNoICA [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerCertChainFabricMismatchRoot { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:@111 error:nil]; + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:@111 error:nil]; XCTAssertNotNil(root); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * operational = [MTRCertificates generateOperationalCertificate:rootKeys - signingCertificate:root - operationalPublicKey:operationalKeys.publicKey - fabricID:@123 - nodeID:@456 - caseAuthenticatedTags:nil - error:nil]; + __auto_type * operational = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:root + operationalPublicKey:operationalKeys.publicKey + fabricID:@123 + nodeID:@456 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNotNil(operational); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithOperationalKeypair:operationalKeys - operationalCertificate:operational - intermediateCertificate:nil - rootCertificate:root - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk + operationalKeypair:operationalKeys + operationalCertificate:operational + intermediateCertificate:nil + rootCertificate:root]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNil(controller); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerCertChainFabricMismatchIntermediate { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerID:nil fabricID:@123 error:nil]; + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:@123 error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediate = [MTRCertificates generateIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:@111 - error:nil]; + __auto_type * intermediate = [MTRCertificates createIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys.publicKey + issuerID:nil + fabricID:@111 + error:nil]; XCTAssertNotNil(intermediate); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * operational = [MTRCertificates generateOperationalCertificate:intermediateKeys - signingCertificate:intermediate - operationalPublicKey:operationalKeys.publicKey - fabricID:@123 - nodeID:@456 - caseAuthenticatedTags:nil - error:nil]; + __auto_type * operational = [MTRCertificates createOperationalCertificate:intermediateKeys + signingCertificate:intermediate + operationalPublicKey:operationalKeys.publicKey + fabricID:@123 + nodeID:@456 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNotNil(operational); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithOperationalKeypair:operationalKeys - operationalCertificate:operational - intermediateCertificate:intermediate - rootCertificate:root - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk + operationalKeypair:operationalKeys + operationalCertificate:operational + intermediateCertificate:intermediate + rootCertificate:root]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNil(controller); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } - (void)testControllerExternallyProvidedOperationalKey { - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; @@ -1284,15 +1239,13 @@ - (void)testControllerExternallyProvidedOperationalKey __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys - fabricID:@(1) - ipk:rootKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; XCTAssertNotNil(params); params.vendorID = @(kTestVendorId); params.operationalKeypair = operationalKeys; - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -1305,13 +1258,13 @@ - (void)testControllerExternallyProvidedOperationalKey // keypair should now fail, because we won't know what operational keys to // use. params.operationalKeypair = nil; - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNil(controller); // But bringing up the controller with provided operational keys should // work, and have the same node id. params.operationalKeypair = operationalKeys; - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -1326,7 +1279,7 @@ - (void)testControllerExternallyProvidedOperationalKey XCTAssertNotNil(newOperationalKeys); params.operationalKeypair = newOperationalKeys; - controller = [factory startControllerOnExistingFabric:params]; + controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -1335,7 +1288,7 @@ - (void)testControllerExternallyProvidedOperationalKey [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory shutdown]; + [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 4add3e6c008da7..cd14933a3caee7 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -39,14 +39,11 @@ #define MANUAL_INDIVIDUAL_TEST 0 static const uint16_t kPairingTimeoutInSeconds = 10; -static const uint16_t kCASESetupTimeoutInSeconds = 30; static const uint16_t kTimeoutInSeconds = 3; static const uint64_t kDeviceId = 0x12344321; -static const uint32_t kSetupPINCode = 20202021; -static const uint16_t kRemotePort = 5540; +static NSString * kOnboardingPayload = @"MT:-24J0AFN00KA0648G00"; static const uint16_t kLocalPort = 5541; -static NSString * kAddress = @"::1"; -static uint16_t kTestVendorId = 0xFFF1u; +static const uint16_t kTestVendorId = 0xFFF1u; // This test suite reuses a device object to speed up the test process for CI. // The following global variable holds the reference to the device object. @@ -55,18 +52,17 @@ // Singleton controller we use. static MTRDeviceController * sController = nil; -static void WaitForCommissionee(XCTestExpectation * expectation, dispatch_queue_t queue) +static void WaitForCommissionee(XCTestExpectation * expectation) { MTRDeviceController * controller = sController; XCTAssertNotNil(controller); - [controller getBaseDevice:kDeviceId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertEqual(error.code, 0); - [expectation fulfill]; - mConnectedDevice = device; - }]; + // For now keep the async dispatch, but could we just + // synchronously fulfill the expectation here? + dispatch_async(dispatch_get_main_queue(), ^{ + [expectation fulfill]; + mConnectedDevice = [MTRBaseDevice deviceWithNodeID:@(kDeviceId) controller:controller]; + }); } static MTRBaseDevice * GetConnectedDevice(void) @@ -81,11 +77,11 @@ - (void)failSubscribers:(dispatch_queue_t)queue completion:(void (^)(void))compl @end #endif -@interface MTRDeviceTestPairingDelegate : NSObject +@interface MTRDeviceTestDeviceControllerDelegate : NSObject @property (nonatomic, strong) XCTestExpectation * expectation; @end -@implementation MTRDeviceTestPairingDelegate +@implementation MTRDeviceTestDeviceControllerDelegate - (id)initWithExpectation:(XCTestExpectation *)expectation { self = [super init]; @@ -100,7 +96,9 @@ - (void)onPairingComplete:(NSError *)error XCTAssertEqual(error.code, 0); NSError * commissionError = nil; - [sController commissionDevice:kDeviceId commissioningParams:[[MTRCommissioningParameters alloc] init] error:&commissionError]; + [sController commissionNodeWithID:@(kDeviceId) + commissioningParams:[[MTRCommissioningParameters alloc] init] + error:&commissionError]; XCTAssertNil(commissionError); // Keep waiting for onCommissioningComplete @@ -144,49 +142,42 @@ - (void)initStack { XCTestExpectation * expectation = [self expectationWithDescription:@"Pairing Complete"]; - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; factoryParams.port = @(kLocalPort); - BOOL ok = [factory startup:factoryParams]; + BOOL ok = [factory startControllerFactory:factoryParams error:nil]; XCTAssertTrue(ok); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(1) - ipk:testKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; XCTAssertNotNil(controller); sController = controller; - MTRDeviceTestPairingDelegate * pairing = [[MTRDeviceTestPairingDelegate alloc] initWithExpectation:expectation]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.pairing", DISPATCH_QUEUE_SERIAL); + MTRDeviceTestDeviceControllerDelegate * deviceControllerDelegate = + [[MTRDeviceTestDeviceControllerDelegate alloc] initWithExpectation:expectation]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.device_controller_delegate", DISPATCH_QUEUE_SERIAL); - [controller setPairingDelegate:pairing queue:callbackQueue]; + [controller setDeviceControllerDelegate:deviceControllerDelegate queue:callbackQueue]; NSError * error; - [controller pairDevice:kDeviceId address:kAddress port:kRemotePort setupPINCode:kSetupPINCode error:&error]; - XCTAssertEqual(error.code, 0); + __auto_type * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:kOnboardingPayload error:&error]; + XCTAssertNotNil(payload); + XCTAssertNil(error); - [self waitForExpectationsWithTimeout:kPairingTimeoutInSeconds handler:nil]; + [controller setupCommissioningSessionWithPayload:payload newNodeID:@(kDeviceId) error:&error]; + XCTAssertNil(error); - __block XCTestExpectation * connectionExpectation = [self expectationWithDescription:@"CASE established"]; - [controller getBaseDevice:kDeviceId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertEqual(error.code, 0); - [connectionExpectation fulfill]; - connectionExpectation = nil; - }]; - [self waitForExpectationsWithTimeout:kCASESetupTimeoutInSeconds handler:nil]; + [self waitForExpectationsWithTimeout:kPairingTimeoutInSeconds handler:nil]; } - (void)shutdownStack @@ -197,15 +188,14 @@ - (void)shutdownStack [controller shutdown]; XCTAssertFalse([controller isRunning]); - [[MTRControllerFactory sharedInstance] shutdown]; + [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; } - (void)waitForCommissionee { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForCommissionee(expectation, queue); + WaitForCommissionee(expectation); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -229,31 +219,31 @@ - (void)test001_ReadAttribute MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - [device readAttributeWithEndpointID:nil - clusterID:@29 - attributeID:@0 - params:nil - queue:queue - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); - - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); - - { - XCTAssertTrue([values isKindOfClass:[NSArray class]]); - NSArray * resultArray = values; - for (NSDictionary * result in resultArray) { - MTRAttributePath * path = result[@"attributePath"]; - XCTAssertEqual([path.cluster unsignedIntegerValue], 29); - XCTAssertEqual([path.attribute unsignedIntegerValue], 0); - XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); - XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Array"]); + [device readAttributePathWithEndpointID:nil + clusterID:@29 + attributeID:@0 + params:nil + queue:queue + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); + + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); + + { + XCTAssertTrue([values isKindOfClass:[NSArray class]]); + NSArray * resultArray = values; + for (NSDictionary * result in resultArray) { + MTRAttributePath * path = result[@"attributePath"]; + XCTAssertEqual([path.cluster unsignedIntegerValue], 29); + XCTAssertEqual([path.attribute unsignedIntegerValue], 0); + XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); + XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Array"]); + } + XCTAssertTrue([resultArray count] > 0); } - XCTAssertTrue([resultArray count] > 0); - } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -407,12 +397,11 @@ - (void)test005_Subscribe // Subscribe XCTestExpectation * expectation = [self expectationWithDescription:@"subscribe OnOff attribute"]; - [device subscribeAttributeWithEndpointID:@1 + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(10)]; + [device subscribeAttributePathWithEndpointID:@1 clusterID:@6 attributeID:@0 - minInterval:@1 - maxInterval:@10 - params:nil + params:params queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -548,20 +537,20 @@ - (void)test006_ReadAttributeFailure MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - [device - readAttributeWithEndpointID:@0 - clusterID:@10000 - attributeID:@0 - params:nil - queue:queue - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); + [device readAttributePathWithEndpointID:@0 + clusterID:@10000 + attributeID:@0 + params:nil + queue:queue + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); - XCTAssertNil(values); - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER); + XCTAssertNil(values); + XCTAssertEqual( + [MTRErrorTestUtils errorToZCLErrorCode:error], EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObject:expectation] timeout:kTimeoutInSeconds]; } @@ -666,13 +655,11 @@ - (void)test009_SubscribeFailure }]; [self waitForExpectations:@[ cleanSubscriptionExpectation ] timeout:kTimeoutInSeconds]; - __auto_type * params = [[MTRSubscribeParams alloc] init]; - params.autoResubscribe = @(NO); - [device subscribeAttributeWithEndpointID:@10000 + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; + params.autoResubscribe = NO; + [device subscribeAttributePathWithEndpointID:@10000 clusterID:@6 attributeID:@0 - minInterval:@2 - maxInterval:@10 params:params queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { @@ -705,30 +692,30 @@ - (void)test010_ReadAllAttribute MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - [device readAttributeWithEndpointID:@1 - clusterID:@29 - attributeID:nil - params:nil - queue:queue - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); - - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); - - { - XCTAssertTrue([values isKindOfClass:[NSArray class]]); - NSArray * resultArray = values; - for (NSDictionary * result in resultArray) { - MTRAttributePath * path = result[@"attributePath"]; - XCTAssertEqual([path.cluster unsignedIntegerValue], 29); - XCTAssertEqual([path.endpoint unsignedIntegerValue], 1); - XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); + [device readAttributePathWithEndpointID:@1 + clusterID:@29 + attributeID:nil + params:nil + queue:queue + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); + + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); + + { + XCTAssertTrue([values isKindOfClass:[NSArray class]]); + NSArray * resultArray = values; + for (NSDictionary * result in resultArray) { + MTRAttributePath * path = result[@"attributePath"]; + XCTAssertEqual([path.cluster unsignedIntegerValue], 29); + XCTAssertEqual([path.endpoint unsignedIntegerValue], 1); + XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); + } + XCTAssertTrue([resultArray count] > 0); } - XCTAssertTrue([resultArray count] > 0); - } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObject:expectation] timeout:kTimeoutInSeconds]; } @@ -758,10 +745,9 @@ - (void)test011_ReadCachedAttribute NSLog(@"Subscribing..."); __block void (^reportHandler)(NSArray * _Nullable value, NSError * _Nullable error); + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(60)]; [device subscribeWithQueue:queue - minInterval:@(2) - maxInterval:@(60) - params:nil + params:params attributeCacheContainer:attributeCacheContainer attributeReportHandler:^(NSArray * value) { NSLog(@"Received report: %@", value); @@ -820,11 +806,9 @@ - (void)test011_ReadCachedAttribute // Add another subscriber of the attribute to verify that attribute cache still works when there are other subscribers. NSLog(@"New subscription..."); XCTestExpectation * newSubscriptionEstablished = [self expectationWithDescription:@"New subscription established"]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions = [NSNumber numberWithBool:YES]; - [cluster subscribeAttributeOnOffWithMinInterval:[NSNumber numberWithUnsignedShort:2] - maxInterval:[NSNumber numberWithUnsignedShort:60] - params:params + MTRSubscribeParams * newParams = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(60)]; + newParams.keepPreviousSubscriptions = YES; + [cluster subscribeAttributeOnOffWithParams:newParams subscriptionEstablished:^{ NSLog(@"New subscription was established"); [newSubscriptionEstablished fulfill]; @@ -1005,12 +989,11 @@ - (void)test012_SubscriptionError // Subscribe XCTestExpectation * expectation = [self expectationWithDescription:@"subscribe OnOff attribute"]; - [device subscribeAttributeWithEndpointID:@1 + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(10)]; + [device subscribeAttributePathWithEndpointID:@1 clusterID:@6 attributeID:@0 - minInterval:@1 - maxInterval:@10 - params:nil + params:params queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -1106,17 +1089,7 @@ - (void)test013_ReuseChipClusterObject MTRDeviceController * controller = sController; XCTAssertNotNil(controller); - __block MTRBaseDevice * device; - __block XCTestExpectation * connectionExpectation = [self expectationWithDescription:@"CASE established"]; - [controller getBaseDevice:kDeviceId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable retrievedDevice, NSError * _Nullable error) { - XCTAssertEqual(error.code, 0); - [connectionExpectation fulfill]; - connectionExpectation = nil; - device = retrievedDevice; - }]; - [self waitForExpectationsWithTimeout:kCASESetupTimeoutInSeconds handler:nil]; + MTRBaseDevice * device = [MTRBaseDevice deviceWithNodeID:@(kDeviceId) controller:controller]; XCTestExpectation * expectation = [self expectationWithDescription:@"ReuseMTRClusterObjectFirstCall"]; @@ -1228,12 +1201,11 @@ - (void)test900_SubscribeAllAttributes XCTestExpectation * expectation = [self expectationWithDescription:@"subscribe OnOff attribute"]; __block void (^reportHandler)(id _Nullable values, NSError * _Nullable error) = nil; - [device subscribeAttributeWithEndpointID:@1 + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; + [device subscribeAttributePathWithEndpointID:@1 clusterID:@6 attributeID:@0xffffffff - minInterval:@2 - maxInterval:@10 - params:nil + params:params queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"Subscribe all - report attribute values: %@, error: %@, report handler: %d", values, error, diff --git a/src/darwin/Framework/CHIPTests/MTRTestStorage.h b/src/darwin/Framework/CHIPTests/MTRTestStorage.h index 9f8069ccb2a083..ba5e386be23b8c 100644 --- a/src/darwin/Framework/CHIPTests/MTRTestStorage.h +++ b/src/darwin/Framework/CHIPTests/MTRTestStorage.h @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface MTRTestStorage : NSObject +@interface MTRTestStorage : NSObject - (nullable NSData *)storageDataForKey:(NSString *)key; - (BOOL)setStorageData:(NSData *)value forKey:(NSString *)key; - (BOOL)removeStorageDataForKey:(NSString *)key; diff --git a/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m b/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m index e356d0cc998aeb..0c285aba126fb7 100644 --- a/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m +++ b/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m @@ -170,16 +170,16 @@ - (void)readAttributeWithController:(id)controller (void) controller; __auto_type sharedController = sController; if (sharedController) { - __auto_type device = [[MTRBaseDevice alloc] initWithNodeID:nodeID controller:sharedController]; - [device - readAttributeWithEndpointID:endpointID - clusterID:clusterID - attributeID:attributeID - params:[MTRDeviceController decodeXPCReadParams:params] - queue:dispatch_get_main_queue() - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - completion([MTRDeviceController encodeXPCResponseValues:values], error); - }]; + __auto_type device = [MTRBaseDevice deviceWithNodeID:nodeID controller:sharedController]; + [device readAttributePathWithEndpointID:endpointID + clusterID:clusterID + attributeID:attributeID + params:[MTRDeviceController decodeXPCReadParams:params] + queue:dispatch_get_main_queue() + completion:^( + NSArray *> * _Nullable values, NSError * _Nullable error) { + completion([MTRDeviceController encodeXPCResponseValues:values], error); + }]; } else { NSLog(@"Failed to get shared controller"); completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); @@ -198,7 +198,7 @@ - (void)writeAttributeWithController:(id)controller (void) controller; __auto_type sharedController = sController; if (sharedController) { - __auto_type device = [[MTRBaseDevice alloc] initWithNodeID:nodeID controller:sharedController]; + __auto_type device = [MTRBaseDevice deviceWithNodeID:nodeID controller:sharedController]; [device writeAttributeWithEndpointID:endpointID clusterID:clusterID @@ -227,7 +227,7 @@ - (void)invokeCommandWithController:(id)controller (void) controller; __auto_type sharedController = sController; if (sharedController) { - __auto_type device = [[MTRBaseDevice alloc] initWithNodeID:nodeID controller:sharedController]; + __auto_type device = [MTRBaseDevice deviceWithNodeID:nodeID controller:sharedController]; [device invokeCommandWithEndpointID:endpointID clusterID:clusterID @@ -249,30 +249,26 @@ - (void)subscribeAttributeWithController:(id)controller endpointID:(NSNumber * _Nullable)endpointID clusterID:(NSNumber * _Nullable)clusterID attributeID:(NSNumber * _Nullable)attributeID - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - params:(NSDictionary * _Nullable)params + params:(NSDictionary *)params establishedHandler:(dispatch_block_t)establishedHandler { __auto_type sharedController = sController; if (sharedController) { - __auto_type device = [[MTRBaseDevice alloc] initWithNodeID:nodeID controller:sharedController]; - [device subscribeAttributeWithEndpointID:endpointID - clusterID:clusterID - attributeID:attributeID - minInterval:minInterval - maxInterval:maxInterval - params:[MTRDeviceController decodeXPCSubscribeParams:params] - queue:dispatch_get_main_queue() - reportHandler:^( - NSArray *> * _Nullable values, NSError * _Nullable error) { - [self.clientProxy - handleReportWithController:controller - nodeID:nodeID - values:[MTRDeviceController encodeXPCResponseValues:values] - error:error]; - } - subscriptionEstablished:establishedHandler]; + __auto_type device = [MTRBaseDevice deviceWithNodeID:nodeID controller:sharedController]; + [device subscribeAttributePathWithEndpointID:endpointID + clusterID:clusterID + attributeID:attributeID + params:[MTRDeviceController decodeXPCSubscribeParams:params] + queue:dispatch_get_main_queue() + reportHandler:^( + NSArray *> * _Nullable values, NSError * _Nullable error) { + [self.clientProxy + handleReportWithController:controller + nodeID:nodeID + values:[MTRDeviceController encodeXPCResponseValues:values] + error:error]; + } + subscriptionEstablished:establishedHandler]; } else { NSLog(@"Failed to get shared controller"); establishedHandler(); @@ -290,7 +286,7 @@ - (void)stopReportsWithController:(id _Nullable)controller nodeID:(NSNumber *)no { __auto_type sharedController = sController; if (sharedController) { - __auto_type device = [[MTRBaseDevice alloc] initWithNodeID:nodeID controller:sharedController]; + __auto_type device = [MTRBaseDevice deviceWithNodeID:nodeID controller:sharedController]; [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() completion:completion]; } else { NSLog(@"Failed to get shared controller"); @@ -300,9 +296,7 @@ - (void)stopReportsWithController:(id _Nullable)controller nodeID:(NSNumber *)no - (void)subscribeWithController:(id _Nullable)controller nodeID:(NSNumber *)nodeID - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - params:(NSDictionary * _Nullable)params + params:(NSDictionary *)params shouldCache:(BOOL)shouldCache completion:(MTRStatusCompletion)completion { @@ -313,12 +307,10 @@ - (void)subscribeWithController:(id _Nullable)controller attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; } - __auto_type device = [[MTRBaseDevice alloc] initWithNodeID:nodeID controller:sharedController]; + __auto_type device = [MTRBaseDevice deviceWithNodeID:nodeID controller:sharedController]; NSMutableArray * established = [NSMutableArray arrayWithCapacity:1]; [established addObject:@NO]; [device subscribeWithQueue:dispatch_get_main_queue() - minInterval:minInterval - maxInterval:maxInterval params:[MTRDeviceController decodeXPCSubscribeParams:params] attributeCacheContainer:attributeCacheContainer attributeReportHandler:^(NSArray * value) { @@ -375,13 +367,10 @@ - (void)readAttributeCacheWithController:(id _Nullable)controller @end static const uint16_t kPairingTimeoutInSeconds = 10; -static const uint16_t kCASESetupTimeoutInSeconds = 30; static const uint16_t kTimeoutInSeconds = 3; static const uint64_t kDeviceId = 0x12344321; -static const uint32_t kSetupPINCode = 20202021; -static const uint16_t kRemotePort = 5540; +static NSString * kOnboardingPayload = @"MT:-24J0AFN00KA0648G00"; static const uint16_t kLocalPort = 5541; -static NSString * kAddress = @"::1"; // This test suite reuses a device object to speed up the test process for CI. // The following global variable holds the reference to the device object. @@ -395,11 +384,11 @@ - (void)readAttributeCacheWithController:(id _Nullable)controller return mConnectedDevice; } -@interface MTRRemoteDeviceSampleTestPairingDelegate : NSObject +@interface MTRRemoteDeviceSampleTestDeviceControllerDelegate : NSObject @property (nonatomic, strong) XCTestExpectation * expectation; @end -@implementation MTRRemoteDeviceSampleTestPairingDelegate +@implementation MTRRemoteDeviceSampleTestDeviceControllerDelegate - (id)initWithExpectation:(XCTestExpectation *)expectation { self = [super init]; @@ -413,7 +402,9 @@ - (void)onPairingComplete:(NSError *)error { XCTAssertEqual(error.code, 0); NSError * commissionError = nil; - [sController commissionDevice:kDeviceId commissioningParams:[[MTRCommissioningParameters alloc] init] error:&commissionError]; + [sController commissionNodeWithID:@(kDeviceId) + commissioningParams:[[MTRCommissioningParameters alloc] init] + error:&commissionError]; XCTAssertNil(commissionError); // Keep waiting for onCommissioningComplete @@ -458,50 +449,44 @@ - (void)initStack { XCTestExpectation * expectation = [self expectationWithDescription:@"Pairing Complete"]; - __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; factoryParams.port = @(kLocalPort); - BOOL ok = [factory startup:factoryParams]; + NSError * error; + BOOL ok = [factory startControllerFactory:factoryParams error:&error]; XCTAssertTrue(ok); + XCTAssertNil(error); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys - fabricID:@(1) - ipk:testKeys.ipk]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:&error]; XCTAssertNotNil(controller); + XCTAssertNil(error); sController = controller; - MTRRemoteDeviceSampleTestPairingDelegate * pairing = - [[MTRRemoteDeviceSampleTestPairingDelegate alloc] initWithExpectation:expectation]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.pairing", DISPATCH_QUEUE_SERIAL); + MTRRemoteDeviceSampleTestDeviceControllerDelegate * deviceControllerDelegate = + [[MTRRemoteDeviceSampleTestDeviceControllerDelegate alloc] initWithExpectation:expectation]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.device_controller_delegate", DISPATCH_QUEUE_SERIAL); - [controller setPairingDelegate:pairing queue:callbackQueue]; + [controller setDeviceControllerDelegate:deviceControllerDelegate queue:callbackQueue]; - NSError * error; - [controller pairDevice:kDeviceId address:kAddress port:kRemotePort setupPINCode:kSetupPINCode error:&error]; - XCTAssertEqual(error.code, 0); + __auto_type * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:kOnboardingPayload error:&error]; + XCTAssertNotNil(payload); + XCTAssertNil(error); - [self waitForExpectationsWithTimeout:kPairingTimeoutInSeconds handler:nil]; + [controller setupCommissioningSessionWithPayload:payload newNodeID:@(kDeviceId) error:&error]; + XCTAssertNil(error); - __block XCTestExpectation * connectionExpectation = [self expectationWithDescription:@"CASE established"]; - [controller getBaseDevice:kDeviceId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertEqual(error.code, 0); - [connectionExpectation fulfill]; - connectionExpectation = nil; - }]; - [self waitForExpectationsWithTimeout:kCASESetupTimeoutInSeconds handler:nil]; + [self waitForExpectationsWithTimeout:kPairingTimeoutInSeconds handler:nil]; mSampleListener = [[MTRXPCListenerSample alloc] init]; [mSampleListener start]; @@ -518,16 +503,13 @@ - (void)shutdownStack [controller shutdown]; XCTAssertFalse([controller isRunning]); - [[MTRControllerFactory sharedInstance] shutdown]; + [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; mDeviceController = nil; } - (void)waitForCommissionee { - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - - dispatch_queue_t queue = dispatch_get_main_queue(); __auto_type remoteController = [MTRDeviceController sharedControllerWithID:MTRDeviceControllerId xpcConnectBlock:^NSXPCConnection * _Nonnull { @@ -537,13 +519,7 @@ - (void)waitForCommissionee NSLog(@"Listener is not active"); return nil; }]; - [remoteController getBaseDevice:kDeviceId - queue:queue - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - mConnectedDevice = device; - [expectation fulfill]; - }]; - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + mConnectedDevice = [MTRBaseDevice deviceWithNodeID:@(kDeviceId) controller:remoteController]; mDeviceController = remoteController; } @@ -567,31 +543,31 @@ - (void)test001_ReadAttribute MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - [device readAttributeWithEndpointID:nil - clusterID:@29 - attributeID:@0 - params:nil - queue:queue - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); - - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); - - { - XCTAssertTrue([values isKindOfClass:[NSArray class]]); - NSArray * resultArray = values; - for (NSDictionary * result in resultArray) { - MTRAttributePath * path = result[@"attributePath"]; - XCTAssertEqual([path.cluster unsignedIntegerValue], 29); - XCTAssertEqual([path.attribute unsignedIntegerValue], 0); - XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); - XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Array"]); + [device readAttributePathWithEndpointID:nil + clusterID:@29 + attributeID:@0 + params:nil + queue:queue + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); + + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); + + { + XCTAssertTrue([values isKindOfClass:[NSArray class]]); + NSArray * resultArray = values; + for (NSDictionary * result in resultArray) { + MTRAttributePath * path = result[@"attributePath"]; + XCTAssertEqual([path.cluster unsignedIntegerValue], 29); + XCTAssertEqual([path.attribute unsignedIntegerValue], 0); + XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); + XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Array"]); + } + XCTAssertTrue([resultArray count] > 0); } - XCTAssertTrue([resultArray count] > 0); - } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -700,12 +676,11 @@ - (void)test004_Subscribe MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - [device subscribeAttributeWithEndpointID:@1 + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; + [device subscribeAttributePathWithEndpointID:@1 clusterID:@6 attributeID:@0 - minInterval:@2 - maxInterval:@10 - params:nil + params:params queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -791,22 +766,22 @@ - (void)test005_ReadAttributeFailure MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - [device readAttributeWithEndpointID:@0 - clusterID:@10000 - attributeID:@0 - params:nil - queue:queue - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); + [device readAttributePathWithEndpointID:@0 + clusterID:@10000 + attributeID:@0 + params:nil + queue:queue + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); - XCTAssertNil(values); - // Error is copied over XPC and hence cannot use MTRErrorTestUtils utility which checks against a - // local domain string object. - XCTAssertTrue([error.domain isEqualToString:MTRInteractionErrorDomain]); - XCTAssertEqual(error.code, EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER); + XCTAssertNil(values); + // Error is copied over XPC and hence cannot use MTRErrorTestUtils utility which checks against + // a local domain string object. + XCTAssertTrue([error.domain isEqualToString:MTRInteractionErrorDomain]); + XCTAssertEqual(error.code, EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -899,23 +874,25 @@ - (void)test008_SubscribeFailure // Set up expectation for report XCTestExpectation * errorReportExpectation = [self expectationWithDescription:@"receive OnOff attribute report"]; globalReportHandler = ^(id _Nullable values, NSError * _Nullable error) { + // Because our subscription has no existent paths, it gets an + // InvalidAction response, which is EMBER_ZCL_STATUS_MALFORMED_COMMAND. XCTAssertNil(values); // Error is copied over XPC and hence cannot use MTRErrorTestUtils utility which checks against a local domain string // object. XCTAssertTrue([error.domain isEqualToString:MTRInteractionErrorDomain]); - XCTAssertEqual(error.code, EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT); + XCTAssertEqual(error.code, EMBER_ZCL_STATUS_MALFORMED_COMMAND); [errorReportExpectation fulfill]; }; MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - [device subscribeAttributeWithEndpointID:@10000 + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; + params.autoResubscribe = NO; + [device subscribeAttributePathWithEndpointID:@10000 clusterID:@6 attributeID:@0 - minInterval:@2 - maxInterval:@10 - params:nil + params:params queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -948,32 +925,32 @@ - (void)test009_ReadAttributeWithParams dispatch_queue_t queue = dispatch_get_main_queue(); MTRReadParams * readParams = [[MTRReadParams alloc] init]; - readParams.fabricFiltered = @NO; - [device readAttributeWithEndpointID:nil - clusterID:@29 - attributeID:@0 - params:readParams - queue:queue - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); - - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); - - { - XCTAssertTrue([values isKindOfClass:[NSArray class]]); - NSArray * resultArray = values; - for (NSDictionary * result in resultArray) { - MTRAttributePath * path = result[@"attributePath"]; - XCTAssertEqual([path.cluster unsignedIntegerValue], 29); - XCTAssertEqual([path.attribute unsignedIntegerValue], 0); - XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); - XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Array"]); + readParams.fabricFiltered = NO; + [device readAttributePathWithEndpointID:nil + clusterID:@29 + attributeID:@0 + params:readParams + queue:queue + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); + + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); + + { + XCTAssertTrue([values isKindOfClass:[NSArray class]]); + NSArray * resultArray = values; + for (NSDictionary * result in resultArray) { + MTRAttributePath * path = result[@"attributePath"]; + XCTAssertEqual([path.cluster unsignedIntegerValue], 29); + XCTAssertEqual([path.attribute unsignedIntegerValue], 0); + XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); + XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Array"]); + } + XCTAssertTrue([resultArray count] > 0); } - XCTAssertTrue([resultArray count] > 0); - } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -999,12 +976,11 @@ - (void)test010_SubscribeWithNoParams // Subscribe XCTestExpectation * subscribeExpectation = [self expectationWithDescription:@"subscribe OnOff attribute"]; - [device subscribeAttributeWithEndpointID:@1 + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; + [device subscribeAttributePathWithEndpointID:@1 clusterID:@6 attributeID:@0 - minInterval:@2 - maxInterval:@10 - params:nil + params:params queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -1025,12 +1001,11 @@ - (void)test010_SubscribeWithNoParams // Setup 2nd subscriber subscribeExpectation = [self expectationWithDescription:@"subscribe CurrentLevel attribute"]; - [device subscribeAttributeWithEndpointID:@1 + params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; + [device subscribeAttributePathWithEndpointID:@1 clusterID:@8 attributeID:@0 - minInterval:@2 - maxInterval:@10 - params:nil + params:params queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"2nd subscriber report attribute: CurrentLevel values: %@, error: %@", values, error); @@ -1178,12 +1153,11 @@ - (void)test011_SubscribeWithParams // Subscribe XCTestExpectation * subscribeExpectation = [self expectationWithDescription:@"subscribe OnOff attribute"]; - [device subscribeAttributeWithEndpointID:@1 + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; + [device subscribeAttributePathWithEndpointID:@1 clusterID:@6 attributeID:@0 - minInterval:@2 - maxInterval:@10 - params:nil + params:params queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -1203,14 +1177,12 @@ - (void)test011_SubscribeWithParams [self waitForExpectations:@[ subscribeExpectation ] timeout:kTimeoutInSeconds]; // Setup 2nd subscriber - MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] init]; - myParams.keepPreviousSubscriptions = @NO; + MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; + myParams.keepPreviousSubscriptions = NO; subscribeExpectation = [self expectationWithDescription:@"subscribe CurrentLevel attribute"]; - [device subscribeAttributeWithEndpointID:@1 + [device subscribeAttributePathWithEndpointID:@1 clusterID:@8 attributeID:@0 - minInterval:@2 - maxInterval:@10 params:myParams queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { @@ -1366,12 +1338,11 @@ - (void)test012_SubscribeKeepingPreviousSubscription // Subscribe XCTestExpectation * subscribeExpectation = [self expectationWithDescription:@"subscribe OnOff attribute"]; - [device subscribeAttributeWithEndpointID:@1 + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; + [device subscribeAttributePathWithEndpointID:@1 clusterID:@6 attributeID:@0 - minInterval:@2 - maxInterval:@10 - params:nil + params:params queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -1392,13 +1363,11 @@ - (void)test012_SubscribeKeepingPreviousSubscription // Setup 2nd subscriber subscribeExpectation = [self expectationWithDescription:@"subscribe CurrentLevel attribute"]; - MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] init]; - myParams.keepPreviousSubscriptions = @YES; - [device subscribeAttributeWithEndpointID:@1 + MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; + myParams.keepPreviousSubscriptions = YES; + [device subscribeAttributePathWithEndpointID:@1 clusterID:@8 attributeID:@0 - minInterval:@2 - maxInterval:@10 params:myParams queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { @@ -1601,12 +1570,11 @@ - (void)test013_TimedWriteAttribute // subscribe, which should get the new value at the timeout expectation = [self expectationWithDescription:@"Subscribed"]; __block void (^reportHandler)(id _Nullable values, NSError * _Nullable error); - [device subscribeAttributeWithEndpointID:@1 + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; + [device subscribeAttributePathWithEndpointID:@1 clusterID:@8 attributeID:@17 - minInterval:@2 - maxInterval:@10 - params:nil + params:params queue:queue reportHandler:^(id _Nullable value, NSError * _Nullable error) { NSLog(@"report attribute: Brightness values: %@, error: %@", value, error); @@ -1644,7 +1612,8 @@ - (void)test013_TimedWriteAttribute // Read back to see if the timed write has taken effect expectation = [self expectationWithDescription:@"Read LevelControl Brightness attribute after pause"]; - [device readAttributeWithEndpointID:@1 + [device + readAttributePathWithEndpointID:@1 clusterID:@8 attributeID:@17 params:nil @@ -1727,10 +1696,9 @@ - (void)test900_SubscribeAttributeCache MTRAttributeCacheContainer * attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; NSLog(@"Setting up attribute cache subscription..."); + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(60)]; [device subscribeWithQueue:queue - minInterval:@(1) - maxInterval:@(60) - params:nil + params:params attributeCacheContainer:attributeCacheContainer attributeReportHandler:^(NSArray * value) { NSLog(@"Report for attribute cache: %@", value); diff --git a/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m b/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m index 70061248a89cc6..25a9ec9cf68fbe 100644 --- a/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m +++ b/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m @@ -92,49 +92,39 @@ - (void)subscribeWithDeviceController:(MTRDeviceController *)deviceController queue:queue completion:(void (^)(NSError * _Nullable error))completion { - __auto_type workQueue = dispatch_get_main_queue(); __auto_type completionHandler = ^(NSError * _Nullable error) { dispatch_async(queue, ^{ completion(error); }); }; - [deviceController - getBaseDevice:[deviceID unsignedLongLongValue] - queue:workQueue - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - if (error) { - NSLog(@"Error: Failed to get connected device (%llu) for attribute cache: %@", [deviceID unsignedLongLongValue], - error); - completionHandler(error); - return; - } - __auto_type established = [NSMutableArray arrayWithCapacity:1]; - [established addObject:@NO]; - [device subscribeWithQueue:queue - minInterval:@(1) - maxInterval:@(43200) - params:params - attributeCacheContainer:self - attributeReportHandler:^(NSArray * value) { - NSLog(@"Report received for attribute cache: %@", value); - } - eventReportHandler:nil - errorHandler:^(NSError * error) { - NSLog(@"Report error received for attribute cache: %@", error); - if (![established[0] boolValue]) { - established[0] = @YES; - completionHandler(error); - } - } - subscriptionEstablished:^() { - NSLog(@"Attribute cache subscription succeeded for device %llu", [deviceID unsignedLongLongValue]); - if (![established[0] boolValue]) { - established[0] = @YES; - completionHandler(nil); - } - } - resubscriptionScheduled:nil]; - }]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:deviceID controller:deviceController]; + + __auto_type * subscriptionParams + = (params == nil) ? [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(43200)] : params; + __auto_type established = [NSMutableArray arrayWithCapacity:1]; + [established addObject:@NO]; + [device subscribeWithQueue:queue + params:subscriptionParams + attributeCacheContainer:self + attributeReportHandler:^(NSArray * value) { + NSLog(@"Report received for attribute cache: %@", value); + } + eventReportHandler:nil + errorHandler:^(NSError * error) { + NSLog(@"Report error received for attribute cache: %@", error); + if (![established[0] boolValue]) { + established[0] = @YES; + completionHandler(error); + } + } + subscriptionEstablished:^() { + NSLog(@"Attribute cache subscription succeeded for device %llu", [deviceID unsignedLongLongValue]); + if (![established[0] boolValue]) { + established[0] = @YES; + completionHandler(nil); + } + } + resubscriptionScheduled:nil]; } @end @@ -161,12 +151,12 @@ @interface MTRXPCProtocolTests @property (readwrite, strong) void (^handleInvokeCommand) (id controller, NSNumber * nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id fields, NSNumber * _Nullable timedInvokeTimeout, void (^completion)(id _Nullable values, NSError * _Nullable error)); -@property (readwrite, strong) void (^handleSubscribeAttribute)(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, - NSNumber * _Nullable clusterId, NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, - MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)); +@property (readwrite, strong) void (^handleSubscribeAttribute) + (id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nonnull params, void (^establishedHandler)(void)); @property (readwrite, strong) void (^handleStopReports)(id controller, NSNumber * nodeId, void (^completion)(void)); -@property (readwrite, strong) void (^handleSubscribeAll)(id controller, NSNumber * nodeId, NSNumber * minInterval, - NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, BOOL shouldCache, void (^completion)(NSError * _Nullable error)); +@property (readwrite, strong) void (^handleSubscribeAll)(id controller, NSNumber * nodeId, MTRSubscribeParams * _Nonnull params, + BOOL shouldCache, void (^completion)(NSError * _Nullable error)); @property (readwrite, strong) void (^handleReadAttributeCache) (id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, NSNumber * _Nullable attributeId, void (^completion)(id _Nullable values, NSError * _Nullable error)); @@ -263,14 +253,12 @@ - (void)subscribeAttributeWithController:(id)controller endpointID:(NSNumber * _Nullable)endpointID clusterID:(NSNumber * _Nullable)clusterID attributeID:(NSNumber * _Nullable)attributeID - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - params:(NSDictionary * _Nullable)params + params:(NSDictionary *)params establishedHandler:(dispatch_block_t)establishedHandler { dispatch_async(dispatch_get_main_queue(), ^{ XCTAssertNotNil(self.handleSubscribeAttribute); - self.handleSubscribeAttribute(controller, nodeID, endpointID, clusterID, attributeID, minInterval, maxInterval, + self.handleSubscribeAttribute(controller, nodeID, endpointID, clusterID, attributeID, [MTRDeviceController decodeXPCSubscribeParams:params], establishedHandler); }); } @@ -285,16 +273,13 @@ - (void)stopReportsWithController:(id)controller nodeID:(NSNumber *)nodeID compl - (void)subscribeWithController:(id _Nullable)controller nodeID:(NSNumber *)nodeID - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - params:(NSDictionary * _Nullable)params + params:(NSDictionary *)params shouldCache:(BOOL)shouldCache completion:(MTRStatusCompletion)completion { dispatch_async(dispatch_get_main_queue(), ^{ XCTAssertNotNil(self.handleSubscribeAll); - self.handleSubscribeAll(controller, nodeID, minInterval, maxInterval, [MTRDeviceController decodeXPCSubscribeParams:params], - shouldCache, completion); + self.handleSubscribeAll(controller, nodeID, [MTRDeviceController decodeXPCSubscribeParams:params], shouldCache, completion); }); } @@ -366,27 +351,21 @@ - (void)testReadAttributeSuccess completion([MTRDeviceController encodeXPCResponseValues:myValues], nil); }; - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Reading..."); - [device readAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:nil - queue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Read value: %@", value); - XCTAssertNotNil(value); - XCTAssertNil(error); - XCTAssertTrue([myValues isEqual:value]); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Reading..."); + [device readAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Read value: %@", value); + XCTAssertNotNil(value); + XCTAssertNil(error); + XCTAssertTrue([myValues isEqual:value]); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -408,7 +387,7 @@ - (void)testReadAttributeWithParamsSuccess @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } } ]; MTRReadParams * myParams = [[MTRReadParams alloc] init]; - myParams.fabricFiltered = @NO; + myParams.fabricFiltered = NO; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; @@ -423,32 +402,26 @@ - (void)testReadAttributeWithParamsSuccess XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); XCTAssertNotNil(params); - XCTAssertEqual([params.fabricFiltered boolValue], [myParams.fabricFiltered boolValue]); + XCTAssertEqual(params.fabricFiltered, myParams.fabricFiltered); [callExpectation fulfill]; completion([MTRDeviceController encodeXPCResponseValues:myValues], nil); }; - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Reading..."); - [device readAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:myParams - queue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Read value: %@", value); - XCTAssertNotNil(value); - XCTAssertNil(error); - XCTAssertTrue([myValues isEqual:value]); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Reading..."); + [device readAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:myParams + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Read value: %@", value); + XCTAssertNotNil(value); + XCTAssertNil(error); + XCTAssertTrue([myValues isEqual:value]); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -481,26 +454,20 @@ - (void)testReadAttributeFailure completion(nil, myError); }; - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Reading..."); - [device readAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:nil - queue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Read value: %@", value); - XCTAssertNil(value); - XCTAssertNotNil(error); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Reading..."); + [device readAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Read value: %@", value); + XCTAssertNil(value); + XCTAssertNotNil(error); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -540,28 +507,22 @@ - (void)testWriteAttributeSuccess completion([MTRDeviceController encodeXPCResponseValues:myResults], nil); }; - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Writing..."); - [device writeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - value:myValue - timedWriteTimeout:nil - queue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Write response: %@", value); - XCTAssertNotNil(value); - XCTAssertNil(error); - XCTAssertTrue([myResults isEqual:value]); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Writing..."); + [device writeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + value:myValue + timedWriteTimeout:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Write response: %@", value); + XCTAssertNotNil(value); + XCTAssertNil(error); + XCTAssertTrue([myResults isEqual:value]); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -603,28 +564,22 @@ - (void)testTimedWriteAttributeSuccess completion([MTRDeviceController encodeXPCResponseValues:myResults], nil); }; - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Writing..."); - [device writeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - value:myValue - timedWriteTimeout:myTimedWriteTimeout - queue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Write response: %@", value); - XCTAssertNotNil(value); - XCTAssertNil(error); - XCTAssertTrue([myResults isEqual:value]); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Writing..."); + [device writeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + value:myValue + timedWriteTimeout:myTimedWriteTimeout + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Write response: %@", value); + XCTAssertNotNil(value); + XCTAssertNil(error); + XCTAssertTrue([myResults isEqual:value]); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -659,27 +614,21 @@ - (void)testWriteAttributeFailure completion(nil, myError); }; - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Writing..."); - [device writeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - value:myValue - timedWriteTimeout:nil - queue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Write response: %@", value); - XCTAssertNil(value); - XCTAssertNotNil(error); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Writing..."); + [device writeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + value:myValue + timedWriteTimeout:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Write response: %@", value); + XCTAssertNil(value); + XCTAssertNotNil(error); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -719,28 +668,22 @@ - (void)testInvokeCommandSuccess completion([MTRDeviceController encodeXPCResponseValues:myResults], nil); }; - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Invoking command..."); - [device invokeCommandWithEndpointID:myEndpointId - clusterID:myClusterId - commandID:myCommandId - commandFields:myFields - timedInvokeTimeout:nil - queue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Command response: %@", value); - XCTAssertNotNil(value); - XCTAssertNil(error); - XCTAssertTrue([myResults isEqual:value]); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Invoking command..."); + [device invokeCommandWithEndpointID:myEndpointId + clusterID:myClusterId + commandID:myCommandId + commandFields:myFields + timedInvokeTimeout:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Command response: %@", value); + XCTAssertNotNil(value); + XCTAssertNil(error); + XCTAssertTrue([myResults isEqual:value]); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -782,28 +725,22 @@ - (void)testTimedInvokeCommandSuccess completion([MTRDeviceController encodeXPCResponseValues:myResults], nil); }; - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Invoking command..."); - [device invokeCommandWithEndpointID:myEndpointId - clusterID:myClusterId - commandID:myCommandId - commandFields:myFields - timedInvokeTimeout:myTimedInvokeTimeout - queue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Command response: %@", value); - XCTAssertNotNil(value); - XCTAssertNil(error); - XCTAssertTrue([myResults isEqual:value]); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Invoking command..."); + [device invokeCommandWithEndpointID:myEndpointId + clusterID:myClusterId + commandID:myCommandId + commandFields:myFields + timedInvokeTimeout:myTimedInvokeTimeout + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Command response: %@", value); + XCTAssertNotNil(value); + XCTAssertNil(error); + XCTAssertTrue([myResults isEqual:value]); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -841,27 +778,21 @@ - (void)testInvokeCommandFailure completion(nil, myError); }; - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Invoking command..."); - [device invokeCommandWithEndpointID:myEndpointId - clusterID:myClusterId - commandID:myCommandId - commandFields:myFields - timedInvokeTimeout:nil - queue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Command response: %@", value); - XCTAssertNil(value); - XCTAssertNotNil(error); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Invoking command..."); + [device invokeCommandWithEndpointID:myEndpointId + clusterID:myClusterId + commandID:myCommandId + commandFields:myFields + timedInvokeTimeout:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Command response: %@", value); + XCTAssertNil(value); + XCTAssertNotNil(error); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -890,47 +821,38 @@ - (void)testSubscribeAttributeSuccess __auto_type uuid = self.controllerUUID; _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, - void (^establishedHandler)(void)) { + NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nonnull params, void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); - XCTAssertNil(params); + XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:params + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -970,15 +892,12 @@ - (void)testSubscribeAttributeSuccess }; // Deregister report handler - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -993,9 +912,9 @@ - (void)testSubscribeAttributeWithParamsSuccess NSNumber * myAttributeId = @300; NSNumber * myMinInterval = @5; NSNumber * myMaxInterval = @60; - MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] init]; - myParams.fabricFiltered = @NO; - myParams.keepPreviousSubscriptions = @NO; + MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; + myParams.fabricFiltered = NO; + myParams.keepPreviousSubscriptions = NO; __block NSArray * myReport = @[ @{ @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId clusterID:myClusterId @@ -1008,49 +927,39 @@ - (void)testSubscribeAttributeWithParamsSuccess __auto_type uuid = self.controllerUUID; _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, - void (^establishedHandler)(void)) { + NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nonnull params, void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); - XCTAssertNotNil(params); - XCTAssertEqual([params.fabricFiltered boolValue], [myParams.fabricFiltered boolValue]); - XCTAssertEqual([params.keepPreviousSubscriptions boolValue], [myParams.keepPreviousSubscriptions boolValue]); + XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertEqual(params.fabricFiltered, myParams.fabricFiltered); + XCTAssertEqual(params.keepPreviousSubscriptions, myParams.keepPreviousSubscriptions); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:myParams - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:myParams + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1090,15 +999,12 @@ - (void)testSubscribeAttributeWithParamsSuccess }; // Deregister report handler - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1125,47 +1031,38 @@ - (void)testBadlyFormattedReport __auto_type uuid = self.controllerUUID; _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, - void (^establishedHandler)(void)) { + NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nonnull params, void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); - XCTAssertNil(params); + XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:params + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1203,15 +1100,12 @@ - (void)testBadlyFormattedReport // Deregister report handler _xpcDisconnectExpectation.inverted = NO; - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1239,47 +1133,38 @@ - (void)testReportWithUnrelatedEndpointId __auto_type uuid = self.controllerUUID; _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, - void (^establishedHandler)(void)) { + NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); - XCTAssertNil(params); + XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:params + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1319,15 +1204,12 @@ - (void)testReportWithUnrelatedEndpointId }; // Deregister report handler - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1355,47 +1237,38 @@ - (void)testReportWithUnrelatedClusterId __auto_type uuid = self.controllerUUID; _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, - void (^establishedHandler)(void)) { + NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nonnull params, void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); - XCTAssertNil(params); + XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:params + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1435,15 +1308,12 @@ - (void)testReportWithUnrelatedClusterId }; // Deregister report handler - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1471,47 +1341,38 @@ - (void)testReportWithUnrelatedAttributeId __auto_type uuid = self.controllerUUID; _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, - void (^establishedHandler)(void)) { + NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nonnull params, void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); - XCTAssertNil(params); + XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:params + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1551,15 +1412,12 @@ - (void)testReportWithUnrelatedAttributeId }; // Deregister report handler - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1587,47 +1445,38 @@ - (void)testReportWithUnrelatedNode __auto_type uuid = self.controllerUUID; _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, - void (^establishedHandler)(void)) { + NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); - XCTAssertNil(params); + XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:params + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1667,15 +1516,12 @@ - (void)testReportWithUnrelatedNode }; // Deregister report handler - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1702,47 +1548,38 @@ - (void)testSubscribeMultiEndpoints __auto_type uuid = self.controllerUUID; _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, - void (^establishedHandler)(void)) { + NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); XCTAssertNil(endpointId); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); - XCTAssertNil(params); + XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:nil - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributePathWithEndpointID:nil + clusterID:myClusterId + attributeID:myAttributeId + params:params + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1782,15 +1619,12 @@ - (void)testSubscribeMultiEndpoints }; // Deregister report handler - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1817,47 +1651,38 @@ - (void)testSubscribeMultiClusters __auto_type uuid = self.controllerUUID; _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, - void (^establishedHandler)(void)) { + NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertNil(clusterId); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); - XCTAssertNil(params); + XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:nil - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributePathWithEndpointID:myEndpointId + clusterID:nil + attributeID:myAttributeId + params:params + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1897,15 +1722,12 @@ - (void)testSubscribeMultiClusters }; // Deregister report handler - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1932,47 +1754,38 @@ - (void)testSubscribeMultiAttributes __auto_type uuid = self.controllerUUID; _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, - void (^establishedHandler)(void)) { + NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertNil(attributeId); - XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); - XCTAssertNil(params); + XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:nil - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:nil + params:params + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -2012,15 +1825,12 @@ - (void)testSubscribeMultiAttributes }; // Deregister report handler - [_remoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -2048,16 +1858,14 @@ - (void)testMutiSubscriptions __auto_type uuid = self.controllerUUID; _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, - void (^establishedHandler)(void)) { + NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); - XCTAssertNil(params); + XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); [callExpectation fulfill]; establishedHandler(); }; @@ -2074,31 +1882,24 @@ - (void)testMutiSubscriptions myMaxInterval = maxIntervals[i]; callExpectation = [self expectationWithDescription:[NSString stringWithFormat:@"XPC call (%u) received", i]]; establishExpectation = [self expectationWithDescription:[NSString stringWithFormat:@"Established (%u) called", i]]; - [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Subscriber [%d] report value: %@", i, values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReports[i] isEqual:values]); - [reportExpectations[i] fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:params + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Subscriber [%d] report value: %@", i, values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReports[i] isEqual:values]); + [reportExpectations[i] fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; } @@ -2149,16 +1950,12 @@ - (void)testMutiSubscriptions // Deregister report handler for first subscriber __auto_type deregisterExpectation = [self expectationWithDescription:@"First subscriber deregistered"]; - [_remoteDeviceController getBaseDevice:nodeToStop - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - [deregisterExpectation fulfill]; - }]; - }]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(nodeToStop) controller:_remoteDeviceController]; + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + [deregisterExpectation fulfill]; + }]; [self waitForExpectations:@[ stopExpectation, deregisterExpectation ] timeout:kTimeoutInSeconds]; @@ -2207,16 +2004,13 @@ - (void)testMutiSubscriptions // Deregister report handler for second subscriber __auto_type secondDeregisterExpectation = [self expectationWithDescription:@"Second subscriber deregistered"]; - [_remoteDeviceController getBaseDevice:nodeToStop - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - [secondDeregisterExpectation fulfill]; - }]; - }]; + device = [MTRBaseDevice deviceWithNodeID:@(nodeToStop) controller:_remoteDeviceController]; + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + [secondDeregisterExpectation fulfill]; + }]; // Wait for deregistration and disconnection [self waitForExpectations:@[ secondDeregisterExpectation, _xpcDisconnectExpectation, stopExpectation ] @@ -2262,6 +2056,31 @@ - (void)testAnySharedRemoteController { NSString * myUUID = [[NSUUID UUID] UUIDString]; uint64_t myNodeId = 9876543210; + NSNumber * myEndpointId = @100; + NSNumber * myClusterId = @200; + NSNumber * myAttributeId = @300; + NSArray * myValues = @[ @{ + @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId], + @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } + } ]; + + XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; + XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; + + _handleReadAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, MTRReadParams * _Nullable params, + void (^completion)(id _Nullable values, NSError * _Nullable error)) { + XCTAssertTrue([controller isEqualToString:myUUID]); + XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); + XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); + XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); + XCTAssertNil(params); + [callExpectation fulfill]; + completion([MTRDeviceController encodeXPCResponseValues:myValues], nil); + }; __auto_type unspecifiedRemoteDeviceController = [MTRDeviceController sharedControllerWithID:nil @@ -2276,17 +2095,30 @@ - (void)testAnySharedRemoteController [anySharedRemoteControllerCallExpectation fulfill]; }; - __auto_type deviceAcquired = [self expectationWithDescription:@"Connected device was acquired"]; - [unspecifiedRemoteDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - [deviceAcquired fulfill]; - }]; - - [self waitForExpectations:[NSArray arrayWithObjects:anySharedRemoteControllerCallExpectation, deviceAcquired, nil] + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:unspecifiedRemoteDeviceController]; + // Do a read to exercise the device. + NSLog(@"Device acquired. Reading..."); + [device readAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Read value: %@", value); + XCTAssertNotNil(value); + XCTAssertNil(error); + XCTAssertTrue([myValues isEqual:value]); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; + }]; + + [self waitForExpectations:[NSArray arrayWithObjects:anySharedRemoteControllerCallExpectation, callExpectation, + responseExpectation, nil] timeout:kTimeoutInSeconds]; + + // When read is done, connection should have been released + [self waitForExpectations:[NSArray arrayWithObject:_xpcDisconnectExpectation] timeout:kTimeoutInSeconds]; + XCTAssertNil(_xpcConnection); } - (void)testSubscribeAttributeCacheSuccess @@ -2297,12 +2129,11 @@ - (void)testSubscribeAttributeCacheSuccess __auto_type uuid = self.controllerUUID; __auto_type attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; - _handleSubscribeAll = ^(id controller, NSNumber * nodeId, NSNumber * minInterval, NSNumber * maxInterval, - MTRSubscribeParams * _Nullable params, BOOL shouldCache, void (^completion)(NSError * _Nullable error)) { + _handleSubscribeAll = ^(id controller, NSNumber * nodeId, MTRSubscribeParams * _Nonnull params, BOOL shouldCache, + void (^completion)(NSError * _Nullable error)) { NSLog(@"Subscribe called"); XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); - XCTAssertNil(params); [callExpectation fulfill]; completion(nil); }; @@ -2325,22 +2156,21 @@ - (void)testSubscribeAttributeCacheSuccess - (void)testSubscribeAttributeCacheWithParamsSuccess { uint64_t myNodeId = 9876543210; - MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] init]; - myParams.fabricFiltered = @YES; - myParams.keepPreviousSubscriptions = @YES; + MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(43200)]; + myParams.fabricFiltered = YES; + myParams.keepPreviousSubscriptions = YES; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; __auto_type attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; - _handleSubscribeAll = ^(id controller, NSNumber * nodeId, NSNumber * minInterval, NSNumber * maxInterval, - MTRSubscribeParams * _Nullable params, BOOL shouldCache, void (^completion)(NSError * _Nullable error)) { + _handleSubscribeAll = ^(id controller, NSNumber * nodeId, MTRSubscribeParams * _Nonnull params, BOOL shouldCache, + void (^completion)(NSError * _Nullable error)) { NSLog(@"Subscribe attribute cache called"); XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); - XCTAssertNotNil(params); - XCTAssertEqual([params.fabricFiltered boolValue], [myParams.fabricFiltered boolValue]); - XCTAssertEqual([params.keepPreviousSubscriptions boolValue], [myParams.keepPreviousSubscriptions boolValue]); + XCTAssertEqual(params.fabricFiltered, myParams.fabricFiltered); + XCTAssertEqual(params.keepPreviousSubscriptions, myParams.keepPreviousSubscriptions); [callExpectation fulfill]; completion(nil); }; @@ -2369,12 +2199,11 @@ - (void)testSubscribeAttributeCacheFailure __auto_type uuid = self.controllerUUID; __auto_type attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; - _handleSubscribeAll = ^(id controller, NSNumber * nodeId, NSNumber * minInterval, NSNumber * maxInterval, - MTRSubscribeParams * _Nullable params, BOOL shouldCache, void (^completion)(NSError * _Nullable error)) { + _handleSubscribeAll = ^(id controller, NSNumber * nodeId, MTRSubscribeParams * _Nonnull params, BOOL shouldCache, + void (^completion)(NSError * _Nullable error)) { NSLog(@"Subscribe attribute cache called"); XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); - XCTAssertNil(params); [callExpectation fulfill]; completion(myError); }; @@ -2413,12 +2242,11 @@ - (void)testReadAttributeCacheSuccess __auto_type uuid = self.controllerUUID; __auto_type attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; - _handleSubscribeAll = ^(id controller, NSNumber * nodeId, NSNumber * minInterval, NSNumber * maxInterval, - MTRSubscribeParams * _Nullable params, BOOL shouldCache, void (^completion)(NSError * _Nullable error)) { + _handleSubscribeAll = ^(id controller, NSNumber * nodeId, MTRSubscribeParams * _Nonnull params, BOOL shouldCache, + void (^completion)(NSError * _Nullable error)) { NSLog(@"Subscribe attribute cache called"); XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); - XCTAssertNil(params); completion(nil); }; @@ -2475,12 +2303,11 @@ - (void)testReadAttributeCacheFailure __auto_type uuid = self.controllerUUID; __auto_type attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; - _handleSubscribeAll = ^(id controller, NSNumber * nodeId, NSNumber * minInterval, NSNumber * maxInterval, - MTRSubscribeParams * _Nullable params, BOOL shouldCache, void (^completion)(NSError * _Nullable error)) { + _handleSubscribeAll = ^(id controller, NSNumber * nodeId, MTRSubscribeParams * _Nonnull params, BOOL shouldCache, + void (^completion)(NSError * _Nullable error)) { NSLog(@"Subscribe attribute cache called"); XCTAssertTrue([controller isEqualToString:uuid]); XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); - XCTAssertNil(params); completion(nil); }; @@ -2537,24 +2364,19 @@ - (void)testXPCConnectionFailure return nil; }]; - [failingDeviceController getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Reading..."); - [device readAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:nil - queue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Read value: %@", value); - XCTAssertNil(value); - XCTAssertNotNil(error); - [responseExpectation fulfill]; - }]; - }]; + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:failingDeviceController]; + NSLog(@"Device acquired. Reading..."); + [device readAttributePathWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Read value: %@", value); + XCTAssertNil(value); + XCTAssertNotNil(error); + [responseExpectation fulfill]; + }]; [self waitForExpectations:@[ responseExpectation ] timeout:kTimeoutInSeconds]; } diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index d643e28707c3f0..051bda23615430 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -15,8 +15,8 @@ 1ED276E026C57CF000547A89 /* MTRCallbackBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1ED276DF26C57CF000547A89 /* MTRCallbackBridge.mm */; }; 1ED276E226C5812A00547A89 /* MTRCluster.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1ED276E126C5812A00547A89 /* MTRCluster.mm */; }; 1ED276E426C5832500547A89 /* MTRCluster.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED276E326C5832500547A89 /* MTRCluster.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1EDCE545289049A100E41EC9 /* MTROTAHeaderParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDCE543289049A100E41EC9 /* MTROTAHeaderParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1EDCE546289049A100E41EC9 /* MTROTAHeaderParser.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1EDCE544289049A100E41EC9 /* MTROTAHeaderParser.mm */; }; + 1EDCE545289049A100E41EC9 /* MTROTAHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDCE543289049A100E41EC9 /* MTROTAHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1EDCE546289049A100E41EC9 /* MTROTAHeader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1EDCE544289049A100E41EC9 /* MTROTAHeader.mm */; }; 27A53C1727FBC6920053F131 /* MTRAttestationTrustStoreBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 27A53C1527FBC6920053F131 /* MTRAttestationTrustStoreBridge.h */; }; 27A53C1827FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 27A53C1627FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm */; }; 2C1B027A2641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2C1B02782641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm */; }; @@ -27,11 +27,11 @@ 2C5EEEF6268A85C400CAE3D3 /* MTRDeviceConnectionBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C5EEEF4268A85C400CAE3D3 /* MTRDeviceConnectionBridge.h */; }; 2C5EEEF7268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2C5EEEF5268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm */; }; 2C8C8FC0253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C8C8FBD253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h */; }; - 2C8C8FC1253E0C2100797F05 /* MTRPersistentStorageDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C8C8FBE253E0C2100797F05 /* MTRPersistentStorageDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2C8C8FC1253E0C2100797F05 /* MTRStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C8C8FBE253E0C2100797F05 /* MTRStorage.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2C8C8FC2253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2C8C8FBF253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.mm */; }; - 2CB7163B252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CB71638252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.h */; }; - 2CB7163C252E8A7C0026E2BB /* MTRDevicePairingDelegateBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2CB71639252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.mm */; }; - 2CB7163F252F731E0026E2BB /* MTRDevicePairingDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CB7163E252F731E0026E2BB /* MTRDevicePairingDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2CB7163B252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CB71638252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h */; }; + 2CB7163C252E8A7C0026E2BB /* MTRDeviceControllerDelegateBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2CB71639252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.mm */; }; + 2CB7163F252F731E0026E2BB /* MTRDeviceControllerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CB7163E252F731E0026E2BB /* MTRDeviceControllerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2FD775552695557E00FF4B12 /* error-mapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FD775542695557E00FF4B12 /* error-mapping.cpp */; }; 3CF134A7289D8ADA0017A19E /* MTRCSRInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CF134A6289D8AD90017A19E /* MTRCSRInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3CF134A9289D8D800017A19E /* MTRCSRInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CF134A8289D8D800017A19E /* MTRCSRInfo.m */; }; @@ -43,9 +43,9 @@ 511913FC28C100EF009235E9 /* MTRBaseSubscriptionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 511913FA28C100EF009235E9 /* MTRBaseSubscriptionCallback.h */; }; 5129BCFD26A9EE3300122DDF /* MTRError.h in Headers */ = {isa = PBXBuildFile; fileRef = 5129BCFC26A9EE3300122DDF /* MTRError.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5136661328067D550025EDAE /* MTRDeviceController_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5136660F28067D540025EDAE /* MTRDeviceController_Internal.h */; }; - 5136661428067D550025EDAE /* MTRControllerFactory.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5136661028067D540025EDAE /* MTRControllerFactory.mm */; }; - 5136661528067D550025EDAE /* MTRControllerFactory_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5136661128067D540025EDAE /* MTRControllerFactory_Internal.h */; }; - 5136661628067D550025EDAE /* MTRControllerFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 5136661228067D550025EDAE /* MTRControllerFactory.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5136661428067D550025EDAE /* MTRDeviceControllerFactory.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5136661028067D540025EDAE /* MTRDeviceControllerFactory.mm */; }; + 5136661528067D550025EDAE /* MTRDeviceControllerFactory_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5136661128067D540025EDAE /* MTRDeviceControllerFactory_Internal.h */; }; + 5136661628067D550025EDAE /* MTRDeviceControllerFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 5136661228067D550025EDAE /* MTRDeviceControllerFactory.h */; settings = {ATTRIBUTES = (Public, ); }; }; 513DDB862761F69300DAA01A /* MTRAttributeTLVValueDecoder_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 513DDB852761F69300DAA01A /* MTRAttributeTLVValueDecoder_Internal.h */; }; 513DDB8A2761F6F900DAA01A /* MTRAttributeTLVValueDecoder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 513DDB892761F6F900DAA01A /* MTRAttributeTLVValueDecoder.mm */; }; 51431AF927D2973E008A7943 /* MTRIMDispatch.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51431AF827D2973E008A7943 /* MTRIMDispatch.mm */; }; @@ -154,8 +154,8 @@ 1ED276DF26C57CF000547A89 /* MTRCallbackBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MTRCallbackBridge.mm; path = "zap-generated/MTRCallbackBridge.mm"; sourceTree = ""; }; 1ED276E126C5812A00547A89 /* MTRCluster.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCluster.mm; sourceTree = ""; }; 1ED276E326C5832500547A89 /* MTRCluster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRCluster.h; sourceTree = ""; }; - 1EDCE543289049A100E41EC9 /* MTROTAHeaderParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTROTAHeaderParser.h; sourceTree = ""; }; - 1EDCE544289049A100E41EC9 /* MTROTAHeaderParser.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROTAHeaderParser.mm; sourceTree = ""; }; + 1EDCE543289049A100E41EC9 /* MTROTAHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTROTAHeader.h; sourceTree = ""; }; + 1EDCE544289049A100E41EC9 /* MTROTAHeader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROTAHeader.mm; sourceTree = ""; }; 27A53C1527FBC6920053F131 /* MTRAttestationTrustStoreBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRAttestationTrustStoreBridge.h; sourceTree = ""; }; 27A53C1627FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRAttestationTrustStoreBridge.mm; sourceTree = ""; }; 2C1B02782641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROperationalCredentialsDelegate.mm; sourceTree = ""; }; @@ -166,11 +166,11 @@ 2C5EEEF4268A85C400CAE3D3 /* MTRDeviceConnectionBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceConnectionBridge.h; sourceTree = ""; }; 2C5EEEF5268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceConnectionBridge.mm; sourceTree = ""; }; 2C8C8FBD253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRPersistentStorageDelegateBridge.h; sourceTree = ""; }; - 2C8C8FBE253E0C2100797F05 /* MTRPersistentStorageDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRPersistentStorageDelegate.h; sourceTree = ""; }; + 2C8C8FBE253E0C2100797F05 /* MTRStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRStorage.h; sourceTree = ""; }; 2C8C8FBF253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRPersistentStorageDelegateBridge.mm; sourceTree = ""; }; - 2CB71638252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDevicePairingDelegateBridge.h; sourceTree = ""; }; - 2CB71639252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDevicePairingDelegateBridge.mm; sourceTree = ""; }; - 2CB7163E252F731E0026E2BB /* MTRDevicePairingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDevicePairingDelegate.h; sourceTree = ""; }; + 2CB71638252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerDelegateBridge.h; sourceTree = ""; }; + 2CB71639252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerDelegateBridge.mm; sourceTree = ""; }; + 2CB7163E252F731E0026E2BB /* MTRDeviceControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerDelegate.h; sourceTree = ""; }; 2FD775542695557E00FF4B12 /* error-mapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "error-mapping.cpp"; path = "../../../app/util/error-mapping.cpp"; sourceTree = ""; }; 3CF134A6289D8AD90017A19E /* MTRCSRInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRCSRInfo.h; sourceTree = ""; }; 3CF134A8289D8D800017A19E /* MTRCSRInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRCSRInfo.m; sourceTree = ""; }; @@ -182,9 +182,9 @@ 511913FA28C100EF009235E9 /* MTRBaseSubscriptionCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRBaseSubscriptionCallback.h; sourceTree = ""; }; 5129BCFC26A9EE3300122DDF /* MTRError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRError.h; sourceTree = ""; }; 5136660F28067D540025EDAE /* MTRDeviceController_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceController_Internal.h; sourceTree = ""; }; - 5136661028067D540025EDAE /* MTRControllerFactory.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRControllerFactory.mm; sourceTree = ""; }; - 5136661128067D540025EDAE /* MTRControllerFactory_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRControllerFactory_Internal.h; sourceTree = ""; }; - 5136661228067D550025EDAE /* MTRControllerFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRControllerFactory.h; sourceTree = ""; }; + 5136661028067D540025EDAE /* MTRDeviceControllerFactory.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerFactory.mm; sourceTree = ""; }; + 5136661128067D540025EDAE /* MTRDeviceControllerFactory_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerFactory_Internal.h; sourceTree = ""; }; + 5136661228067D550025EDAE /* MTRDeviceControllerFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerFactory.h; sourceTree = ""; }; 513DDB852761F69300DAA01A /* MTRAttributeTLVValueDecoder_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRAttributeTLVValueDecoder_Internal.h; sourceTree = ""; }; 513DDB892761F6F900DAA01A /* MTRAttributeTLVValueDecoder.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MTRAttributeTLVValueDecoder.mm; path = "zap-generated/MTRAttributeTLVValueDecoder.mm"; sourceTree = ""; }; 51431AF827D2973E008A7943 /* MTRIMDispatch.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRIMDispatch.mm; sourceTree = ""; }; @@ -355,8 +355,8 @@ B202528F2459E34F00F97062 /* CHIP */ = { isa = PBXGroup; children = ( - 1EDCE543289049A100E41EC9 /* MTROTAHeaderParser.h */, - 1EDCE544289049A100E41EC9 /* MTROTAHeaderParser.mm */, + 1EDCE543289049A100E41EC9 /* MTROTAHeader.h */, + 1EDCE544289049A100E41EC9 /* MTROTAHeader.mm */, 27A53C1527FBC6920053F131 /* MTRAttestationTrustStoreBridge.h */, 27A53C1627FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm */, 88EBF8CB27FABDD500686BC1 /* MTRDeviceAttestationDelegate.h */, @@ -387,7 +387,7 @@ 7596A84C287782E8004DAE0E /* MTRAsyncCallbackWorkQueue_Internal.h */, 7596A84628762783004DAE0E /* MTRAsyncCallbackWorkQueue.h */, 7596A84728762783004DAE0E /* MTRAsyncCallbackWorkQueue.mm */, - 2C8C8FBE253E0C2100797F05 /* MTRPersistentStorageDelegate.h */, + 2C8C8FBE253E0C2100797F05 /* MTRStorage.h */, 5ACDDD7927CD129700EFD68A /* MTRAttributeCacheContainer.h */, 5A60370727EA1FF60020DB79 /* MTRAttributeCacheContainer+XPC.h */, 5ACDDD7B27CD14AF00EFD68A /* MTRAttributeCacheContainer_Internal.h */, @@ -398,9 +398,9 @@ 2C8C8FBF253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.mm */, 99D466E02798936D0089A18F /* MTRCommissioningParameters.h */, 99AECC7F2798A57E00B6355B /* MTRCommissioningParameters.m */, - 2CB7163E252F731E0026E2BB /* MTRDevicePairingDelegate.h */, - 2CB71638252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.h */, - 2CB71639252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.mm */, + 2CB7163E252F731E0026E2BB /* MTRDeviceControllerDelegate.h */, + 2CB71638252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h */, + 2CB71639252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.mm */, AF1CB86D2874B03B00865A96 /* MTROTAProviderDelegate.h */, AF1CB86F2874B04C00865A96 /* MTROTAProviderDelegateBridge.h */, AF5F90FE2878D351005503FA /* MTROTAProviderDelegateBridge.mm */, @@ -421,12 +421,12 @@ 991DC0822475F45400C13860 /* MTRDeviceController.h */, 991DC0872475F47D00C13860 /* MTRDeviceController.mm */, 5136660F28067D540025EDAE /* MTRDeviceController_Internal.h */, - 5136661128067D540025EDAE /* MTRControllerFactory_Internal.h */, + 5136661128067D540025EDAE /* MTRDeviceControllerFactory_Internal.h */, 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */, 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */, 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */, - 5136661228067D550025EDAE /* MTRControllerFactory.h */, - 5136661028067D540025EDAE /* MTRControllerFactory.mm */, + 5136661228067D550025EDAE /* MTRDeviceControllerFactory.h */, + 5136661028067D540025EDAE /* MTRDeviceControllerFactory.mm */, 5A7947E227C0101200434CF2 /* MTRDeviceController+XPC.h */, 517BF3EE282B62B800A8B7DB /* MTRCertificates.h */, 517BF3EF282B62B800A8B7DB /* MTRCertificates.mm */, @@ -496,23 +496,23 @@ files = ( 517BF3F0282B62B800A8B7DB /* MTRCertificates.h in Headers */, 51E51FBF282AD37A00FC978D /* MTRDeviceControllerStartupParams.h in Headers */, - 5136661628067D550025EDAE /* MTRControllerFactory.h in Headers */, + 5136661628067D550025EDAE /* MTRDeviceControllerFactory.h in Headers */, 7596A84B287636C1004DAE0E /* MTRDevice_Internal.h in Headers */, 5A6FEC9927B5C88900F25F42 /* MTRDeviceOverXPC.h in Headers */, 51B22C222740CB1D008D5055 /* MTRCommandPayloadsObjc.h in Headers */, 51B22C1E2740CB0A008D5055 /* MTRStructsObjc.h in Headers */, - 2CB7163B252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.h in Headers */, + 2CB7163B252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h in Headers */, 5ACDDD7A27CD129700EFD68A /* MTRAttributeCacheContainer.h in Headers */, 5A6FEC9227B5669C00F25F42 /* MTRDeviceControllerOverXPC.h in Headers */, 2C1B027B2641DB4E00780EF1 /* MTROperationalCredentialsDelegate.h in Headers */, 7596A85728788557004DAE0E /* MTRClusters.h in Headers */, 99D466E12798936D0089A18F /* MTRCommissioningParameters.h in Headers */, - 5136661528067D550025EDAE /* MTRControllerFactory_Internal.h in Headers */, + 5136661528067D550025EDAE /* MTRDeviceControllerFactory_Internal.h in Headers */, 515C1C70284F9FFB00A48F0C /* MTRMemory.h in Headers */, 7534F12928BFF20300390851 /* MTRDeviceAttestationDelegate_Internal.h in Headers */, D4772A46285AE98400383630 /* MTRClusterConstants.h in Headers */, 513DDB862761F69300DAA01A /* MTRAttributeTLVValueDecoder_Internal.h in Headers */, - 2CB7163F252F731E0026E2BB /* MTRDevicePairingDelegate.h in Headers */, + 2CB7163F252F731E0026E2BB /* MTRDeviceControllerDelegate.h in Headers */, 88EBF8CE27FABDD500686BC1 /* MTRDeviceAttestationDelegate.h in Headers */, 2C222AD0255C620600E446B9 /* MTRBaseDevice.h in Headers */, 7596A84F2877E6A9004DAE0E /* MTRCluster_internal.h in Headers */, @@ -542,7 +542,7 @@ 1ED276E426C5832500547A89 /* MTRCluster.h in Headers */, 5A6FEC9A27B5C89300F25F42 /* MTRDeviceControllerXPCConnection.h in Headers */, 5129BCFD26A9EE3300122DDF /* MTRError.h in Headers */, - 2C8C8FC1253E0C2100797F05 /* MTRPersistentStorageDelegate.h in Headers */, + 2C8C8FC1253E0C2100797F05 /* MTRStorage.h in Headers */, AF1CB8702874B04C00865A96 /* MTROTAProviderDelegateBridge.h in Headers */, 1EC4CE6425CC276600D7304F /* MTRBaseClusters.h in Headers */, 2C5EEEF6268A85C400CAE3D3 /* MTRDeviceConnectionBridge.h in Headers */, @@ -556,7 +556,7 @@ 7596A84828762783004DAE0E /* MTRAsyncCallbackWorkQueue.h in Headers */, 5A7947E527C0129F00434CF2 /* MTRDeviceController+XPC.h in Headers */, B2E0D7B4245B0B5C003C5B48 /* MTRError_Internal.h in Headers */, - 1EDCE545289049A100E41EC9 /* MTROTAHeaderParser.h in Headers */, + 1EDCE545289049A100E41EC9 /* MTROTAHeader.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -682,12 +682,12 @@ files = ( 2C8C8FC2253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.mm in Sources */, 99AECC802798A57F00B6355B /* MTRCommissioningParameters.m in Sources */, - 2CB7163C252E8A7C0026E2BB /* MTRDevicePairingDelegateBridge.mm in Sources */, + 2CB7163C252E8A7C0026E2BB /* MTRDeviceControllerDelegateBridge.mm in Sources */, 997DED162695343400975E97 /* MTRThreadOperationalDataset.mm in Sources */, 515C1C6F284F9FFB00A48F0C /* MTRMemory.mm in Sources */, 27A53C1827FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm in Sources */, 998F287126D56940001846C6 /* MTRP256KeypairBridge.mm in Sources */, - 5136661428067D550025EDAE /* MTRControllerFactory.mm in Sources */, + 5136661428067D550025EDAE /* MTRDeviceControllerFactory.mm in Sources */, 51B22C2A2740CB47008D5055 /* MTRCommandPayloadsObjc.mm in Sources */, AF5F90FF2878D351005503FA /* MTROTAProviderDelegateBridge.mm in Sources */, 7534F12828BFF20300390851 /* MTRDeviceAttestationDelegate.mm in Sources */, @@ -698,7 +698,7 @@ 3CF134A9289D8D800017A19E /* MTRCSRInfo.m in Sources */, 991DC0892475F47D00C13860 /* MTRDeviceController.mm in Sources */, B2E0D7B7245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.mm in Sources */, - 1EDCE546289049A100E41EC9 /* MTROTAHeaderParser.mm in Sources */, + 1EDCE546289049A100E41EC9 /* MTROTAHeader.mm in Sources */, 1EC4CE5D25CC26E900D7304F /* MTRBaseClusters.mm in Sources */, 51E0310127EA20D20083DC9C /* MTRControllerAccessControl.mm in Sources */, 1ED276E226C5812A00547A89 /* MTRCluster.mm in Sources */, diff --git a/src/lib/shell/BUILD.gn b/src/lib/shell/BUILD.gn index 2ac3c0d86d6808..eea3372539fbdf 100644 --- a/src/lib/shell/BUILD.gn +++ b/src/lib/shell/BUILD.gn @@ -63,6 +63,11 @@ static_library("shell") { "MainLoopCYW30739.cpp", "streamer_cyw30739.cpp", ] + } else if (chip_device_platform == "mt793x") { + sources += [ + "MainLoopDefault.cpp", + "streamer_mt793x.cpp", + ] } else if (current_os == "zephyr") { sources += [ "MainLoopZephyr.cpp", diff --git a/src/lib/shell/streamer_mt793x.cpp b/src/lib/shell/streamer_mt793x.cpp new file mode 100644 index 00000000000000..f34230e4af8be7 --- /dev/null +++ b/src/lib/shell/streamer_mt793x.cpp @@ -0,0 +1,73 @@ +/* + * + * 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. + */ + +/** + * @file + * Source implementation of an input / output stream for zehpyr targets. + */ + +#include +#include + +#include + +#include +#include + +namespace chip { +namespace Shell { +namespace { + +int streamer_mt793x_init(streamer_t * streamer) +{ + (void) streamer; + return 0; +} + +ssize_t streamer_mt793x_read(streamer_t * streamer, char * buffer, size_t length) +{ + int i = 0; + (void) streamer; + + while (i < length) + buffer[i++] = (char) bsp_io_def_uart_getchar(); + return length; +} + +ssize_t streamer_mt793x_write(streamer_t * streamer, const char * buffer, size_t length) +{ + int i = 0; + (void) streamer; + while (i < length) + bsp_io_def_uart_putchar(buffer[i++]); + return length; +} + +static streamer_t streamer_mt793x = { + .init_cb = streamer_mt793x_init, + .read_cb = streamer_mt793x_read, + .write_cb = streamer_mt793x_write, +}; +} // namespace + +streamer_t * streamer_get(void) +{ + return &streamer_mt793x; +} + +} // namespace Shell +} // namespace chip diff --git a/src/lwip/BUILD.gn b/src/lwip/BUILD.gn index 17055b2714a4e6..54f6d44372fc37 100644 --- a/src/lwip/BUILD.gn +++ b/src/lwip/BUILD.gn @@ -34,7 +34,7 @@ assert(lwip_platform == "external" || lwip_platform == "standalone" || lwip_platform == "qpg" || lwip_platform == "mbed" || lwip_platform == "psoc6" || lwip_platform == "cyw30739" || lwip_platform == "bl602" || lwip_platform == "mw320" || - lwip_platform == "bl702", + lwip_platform == "bl702" || lwip_platform == "mt793x", "Unsupported lwIP platform: ${lwip_platform}") if (lwip_platform != "external") { @@ -65,6 +65,8 @@ if (lwip_platform == "cc13x2_26x2") { import("//build_overrides/bouffalolab_iot_sdk.gni") } else if (lwip_platform == "mw320") { import("//build_overrides/mw320_sdk.gni") +} else if (lwip_platform == "mt793x") { + import("//build_overrides/mt793x_sdk.gni") } buildconfig_header("lwip_buildconfig") { @@ -168,6 +170,7 @@ if (current_os == "zephyr" || current_os == "mbed") { public += [ "standalone/arch/sys_arch.h" ] sources += [ "standalone/sys_arch.c" ] } else if (lwip_platform == "cyw30739") { + } else if (lwip_platform == "mt793x") { } else { public += [ "${lwip_platform}/lwippools.h", @@ -195,6 +198,8 @@ if (current_os == "zephyr" || current_os == "mbed") { public_deps += [ "${bl602_sdk_build_root}:bl602_sdk" ] } else if (lwip_platform == "bl702") { public_deps += [ "${bl702_sdk_build_root}:bl702_sdk" ] + } else if (lwip_platform == "mt793x") { + public_deps += [ "${mt793x_sdk_build_root}:mt793x_sdk" ] } public_configs = [ diff --git a/src/lwip/mt793x/arch/cc.h b/src/lwip/mt793x/arch/cc.h new file mode 100644 index 00000000000000..dea2a5c640177b --- /dev/null +++ b/src/lwip/mt793x/arch/cc.h @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef __ARCH_CC_H__ +#define __ARCH_CC_H__ + +/* Include some files for defining library routines */ +#include +#include /* printf, fflush, FILE */ +#include /* abort */ +#include +#if (!defined(__CC_ARM)) && (!defined(__ICCARM__)) +#include +#endif +#include "syslog.h" + +#ifndef BYTE_ORDER +#define BYTE_ORDER LITTLE_ENDIAN +#endif +#define LWIP_PLATFORM_BYTESWAP 0 + +/** @todo fix some warnings: don't use #pragma if compiling with cygwin gcc */ +//#ifndef __GNUC__ +#if (!defined(__ICCARM__)) && (!defined(__GNUC__)) && (!defined(__CC_ARM)) +#include +#pragma warning(disable : 4244) /* disable conversion warning (implicit integer promotion!) */ +#pragma warning(disable : 4127) /* conditional expression is constant */ +#pragma warning(disable : 4996) /* 'strncpy' was declared deprecated */ +#pragma warning(disable : 4103) /* structure packing changed by including file */ +#endif + +//#define LWIP_PROVIDE_ERRNO + +#if (!defined(__CC_ARM)) && (!defined(__ICCARM__)) +#define LWIP_TIMEVAL_PRIVATE 0 +#endif + +/* Define generic types used in lwIP */ +typedef unsigned char u8_t; +typedef signed char s8_t; +typedef unsigned short u16_t; +typedef signed short s16_t; +typedef unsigned long u32_t; +typedef signed long s32_t; + +typedef size_t mem_ptr_t; +typedef u32_t sys_prot_t; + +/* Define (sn)printf formatters for these lwIP types */ +#define X8_F "02x" +#define U16_F "hu" +#define S16_F "hd" +#define X16_F "hx" +#define U32_F "lu" +#define S32_F "ld" +#define X32_F "lx" +#define SZT_F U32_F + +/* Compiler hints for packing structures */ +#if defined(__ICCARM__) +#define PACK_STRUCT_STRUCT __packed +#else +#define PACK_STRUCT_STRUCT __attribute__((packed)) +#endif + +//#define LWIP_DEBUG_USE_PRINTF + +#ifdef LWIP_DEBUG_USE_PRINTF +/* Plaform specific diagnostic output */ +#define LWIP_PLATFORM_DIAG(x) \ + do \ + { \ + printf x; \ + } while (0) +#else +//#define LWIP_PLATFORM_DIAG(x) do { LWIP_LOGI x; } while(0) +void filogic_log_print(const char * fmt, ...); +#define LWIP_PLATFORM_DIAG(x) \ + do \ + { \ + filogic_log_print x; \ + } while (0) +#endif + +#if 0 +#define LWIP_PLATFORM_ASSERT(x) \ + do \ + { \ + printf("Assertion \"%s\" failed at line %d in %s\n", x, __LINE__, __FILE__); \ + fflush(NULL); \ + abort(); \ + } while (0) +#else + +#ifdef MTK_DEBUG_LEVEL_NONE +#define LWIP_NOASSERT 1 +#endif + +#ifndef MTK_DEBUG_LEVEL_NONE +#define LWIP_PLATFORM_ASSERT(x) \ + do \ + { \ + printf("Assertion \"%s\" failed at line %d in %s\n", x, __LINE__, __FILE__); \ + } while (0) +#else +#define LWIP_PLATFORM_ASSERT(x) +#endif +#endif + +#if 0 +#define LWIP_ERROR(message, expression, handler) \ + do \ + { \ + if (!(expression)) \ + { \ + printf("Assertion \"%s\" failed at line %d in %s\n", message, __LINE__, __FILE__); \ + fflush(NULL); \ + handler; \ + } \ + } while (0) +#else +#ifndef MTK_DEBUG_LEVEL_NONE +#define LWIP_ERROR(message, expression, handler) \ + do \ + { \ + if (!(expression)) \ + { \ + printf("Assertion \"%s\" failed at line %d in %s\n", message, __LINE__, __FILE__); \ + handler; \ + } \ + } while (0) +#else +#define LWIP_ERROR(message, expression, handler) +#endif +#endif + +/* C runtime functions redefined */ +//#define snprintf _snprintf //2015-07-22 Cheng Liu @132663 + +u32_t dns_lookup_external_hosts_file(const char * name); + +#define LWIP_RAND() ((u32_t) rand()) + +#endif /* __ARCH_CC_H__ */ diff --git a/src/lwip/mt793x/arch/perf.h b/src/lwip/mt793x/arch/perf.h new file mode 100644 index 00000000000000..324ba24ac4af70 --- /dev/null +++ b/src/lwip/mt793x/arch/perf.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2001, Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef __PERF_H__ +#define __PERF_H__ + +#define PERF_START /* null definition */ +#define PERF_STOP(x) /* null definition */ + +#endif /* __PERF_H__ */ diff --git a/src/lwip/mt793x/lwipopts.h b/src/lwip/mt793x/lwipopts.h new file mode 100644 index 00000000000000..36971e36231f11 --- /dev/null +++ b/src/lwip/mt793x/lwipopts.h @@ -0,0 +1,439 @@ +/* + * Copyright (c) 2001, 2002 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#ifndef __LWIPOPTS_H__ +#define __LWIPOPTS_H__ + +#include "FreeRTOSConfig.h" + +#define LWIP_NETIF_TX_ZEROCP_ENABLE 1 +#define LWIP_TCPIP_CORE_LOCKING 1 +#define LWIP_NETIF_TX_SINGLE_PBUF 1 +#define TCPIP_MBOX_SIZE 16 +#define DEFAULT_RAW_RECVMBOX_SIZE 16 +#define DEFAULT_UDP_RECVMBOX_SIZE 16 +#define DEFAULT_TCP_RECVMBOX_SIZE 16 +#define DEFAULT_ACCEPTMBOX_SIZE 16 +#define LWIP_STATS_DISPLAY 0 + +// fix http IOT issue +#define LWIP_WND_SCALE 1 +#define TCP_RCV_SCALE 1 +#define MEMP_NUM_NETDB 4 +// fix reuse address issue +#define SO_REUSE 1 +#define LWIP_SO_RCVTIMEO 1 +// for ip display +#define LWIP_NETIF_STATUS_CALLBACK 1 + +#if defined(MTK_MDNS_ENABLE) +#define LWIP_IPV6 1 +#define IP_REASS_MAXAGE 60 // 3 +#define LWIP_IPV6_FRAG 1 +#define LWIP_MULTICAST_PING 1 +#define LWIP_HAVE_LOOPIF 1 +#define LWIP_IGMP 1 +#define LWIP_NETIF_HOSTNAME 1 +#define LWIP_DHCP_AUTOIP_COOP 1 +#define LWIP_DHCP_AUTOIP_COOP_TRIES 3 + +#define LWIP_NETBUF_RECVINFO 1 +#define LWIP_DNS 1 +#define LWIP_SOCKET 1 +#define LWIP_COMPAT_SOCKETS 1 +#define LWIP_POSIX_SOCKETS_IO_NAMES 1 +#define MEMP_NUM_NETBUF 16 +#define MEMP_NUM_MLD6_GROUP 10 + +#define MEMP_NUM_ND6_QUEUE 30 +#define LWIP_ND6_RETRANS_TIMER 200 +#endif + +#define ETH_PAD_SIZE 0 + +#define NO_SYS 0 +#define LWIP_CALLBACK_API 1 + +/* + -------------------------------------- + ---------- Checksum options ---------- + -------------------------------------- +*/ +#define CHECKSUM_GEN_UDP 0 +#define CHECKSUM_GEN_TCP 0 +#define CHECKSUM_CHECK_UDP 0 +#define CHECKSUM_CHECK_TCP 0 + +/* + ------------------------------------ + ---------- Memory options ---------- + ------------------------------------ +*/ +/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which + lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2 + byte alignment -> define MEM_ALIGNMENT to 2. */ +#define MEM_ALIGNMENT 8 + +/** + * MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator. + * Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution + * speed and usage from interrupts! + */ +#define MEMP_MEM_MALLOC 1 + +/* MEM_SIZE: the size of the heap memory. If the application will send +a lot of data that needs to be copied, this should be set high. */ +#if defined(MTK_WIFI_TGN_VERIFY_ENABLE) && !defined(MTK_HOMEKIT_ENABLE) +#define MEM_SIZE (100 * 1024) +#else +#if defined(MTK_WIFI_ROUTER_ENABLE) +#define MEM_SIZE (78 * 1024) +#else +#define MEM_SIZE (48 * 1024) +#endif +#endif + +/** + * SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain + * critical regions during buffer allocation, deallocation and memory + * allocation and deallocation. + */ + +#define SYS_LIGHTWEIGHT_PROT 1 + +/* + ------------------------------------------------ + ---------- Internal Memory Pool Sizes ---------- + ------------------------------------------------ +*/ + +/* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application + sends a lot of data out of ROM (or other static memory), this + should be set high. */ +#define MEMP_NUM_PBUF 8 +/* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One + per active UDP "connection". */ +#define MEMP_NUM_UDP_PCB 8 +/* MEMP_NUM_TCP_PCB: the number of simultaneously active TCP + connections. */ +#define MEMP_NUM_TCP_PCB 32 // 8 original +/* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP + connections. */ +#define MEMP_NUM_TCP_PCB_LISTEN 32 // 16 original +/* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP + segments. */ +#define MEMP_NUM_TCP_SEG 255 + +/** + * MEMP_NUM_ARP_QUEUE: the number of simulateously queued outgoing + * packets (pbufs) that are waiting for an ARP request (to resolve + * their destination address) to finish. + * (requires the ARP_QUEUEING option) + */ +#define MEMP_NUM_ARP_QUEUE 8 + +/** + * MEMP_NUM_NETCONN: the number of struct netconns. + * (only needed if you use the sequential API, like api_lib.c) + */ +#define MEMP_NUM_NETCONN 32 + +/* + ---------------------------------- + ---------- Pbuf options ---------- + ---------------------------------- +*/ +/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */ +#define PBUF_POOL_SIZE 10 + +/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */ +//#define PBUF_POOL_BUFSIZE 1536 +/* packet of MT7687 IOT has extra TXD header and packet offset */ +#define PBUF_POOL_BUFSIZE 1664 + +/** + * PBUF_LINK_HLEN: the number of bytes that should be allocated for a + * link level header. The default is 14, the standard value for + * Ethernet. + */ + +#define RESERVED_HLEN 0 // depend on CFG_CONNSYS_TXD_PAD_SIZE +#ifdef MTK_HIF_GDMA_ENABLE +#define PBUF_LINK_ENCAPSULATION_HLEN 0 // for WiFi headroom (TX zero copy) +#else +#define PBUF_LINK_ENCAPSULATION_HLEN (64 + 4) +#endif +#define PBUF_LINK_HLEN (RESERVED_HLEN + 14 + ETH_PAD_SIZE) +/* + --------------------------------- + ---------- TCP options ---------- + --------------------------------- +*/ +#define LWIP_TCP 1 +#define TCP_TTL 255 + +/* Controls if TCP should queue segments that arrive out of + order. Define to 0 if your device is low on memory. */ +#define TCP_QUEUE_OOSEQ 1 + +/* TCP Maximum segment size. */ +#define TCP_MSS 1476 + +/* TCP sender buffer space (bytes). */ +#define TCP_SND_BUF (24 * 1024) //(12 * 1024) + +/* TCP sender buffer space (pbufs). This must be at least = 2 * + TCP_SND_BUF/TCP_MSS for things to work. */ +#define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1)) / (TCP_MSS)) + +/* TCP receive window. */ +#define TCP_WND (24 * 1024) + +/* Maximum number of retransmissions of data segments. */ +#define TCP_MAXRTX 12 + +/* Maximum number of retransmissions of SYN segments. */ +#define TCP_SYNMAXRTX 4 + +#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 1 + +/* + --------------------------------- + ---------- ARP options ---------- + --------------------------------- +*/ +#define LWIP_ARP 1 +#define ARP_TABLE_SIZE 10 +#define ARP_QUEUEING 1 + +/* ---------- IP options ---------- */ +/* Define IP_FORWARD to 1 if you wish to have the ability to forward + IP packets across network interfaces. If you are going to run lwIP + on a device with only one network interface, define this to 0. */ +#define IP_FORWARD 1 + +/* Define IP_NAPT to 1 If you wish to have the ability to forward + IP packets across network interfaces using Network Address Port + Translation (NAPT).*/ +#if defined(MTK_WIFI_ROUTER_ENABLE) +#define IP_NAPT 1 +#endif + +/* If defined to 1, IP options are allowed (but not parsed). If + defined to 0, all packets with IP options are dropped. */ +#define IP_OPTIONS 1 + +#define IP_REASSEMBLY 1 + +/** + * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled. + * Since the received pbufs are enqueued, be sure to configure + * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive + * packets even if the maximum amount of fragments is enqueued for reassembly! + */ +#if defined(MTK_WIFI_TGN_VERIFY_ENABLE) +#define IP_REASS_MAX_PBUFS 25 +#else +#define IP_REASS_MAX_PBUFS 12 +#endif +/* ---------- ICMP options ---------- */ +#define ICMP_TTL 255 + +/* ---------- DHCP options ---------- */ +/* Define LWIP_DHCP to 1 if you want DHCP configuration of + interfaces. DHCP is not implemented in lwIP 0.5.1, however, so + turning this on does currently not work. */ +#define LWIP_DHCP 1 +#define LWIP_DHCP_CHECK_LINK_UP 1 + +/* 1 if you want to do an ARP check on the offered address + (recommended). */ +#define DHCP_DOES_ARP_CHECK 1 + +/* ---------- UDP options ---------- */ +#define LWIP_UDP 1 +#define UDP_TTL 255 + +/* ---------- Statistics options ---------- */ +#if defined(MTK_LWIP_STATISTICS_ENABLE) +#define LWIP_STATS 1 +#define LWIP_STATS_DISPLAY 1 +#endif +/* + * Should use the default value defined in tcp_impl.h + */ +/* + ------------------------------------ + ---------- AUTOIP options ---------- + ------------------------------------ +*/ +#if defined(MTK_HOMEKIT_ENABLE) || defined(MTK_MDNS_ENABLE) +#define LWIP_AUTOIP 1 +#else +#define LWIP_AUTOIP 0 +#endif + +/* + ---------------------------------- + ---------- DNS options ----------- + ---------------------------------- +*/ +#define LWIP_DNS 1 + +/* + --------------------------------- + ---------- PPP options ---------- + --------------------------------- +*/ +#define PPP_SUPPORT 0 + +/* + ------------------------------------------------ + ---------- Network Interfaces options ---------- + ------------------------------------------------ +*/ + +/** + * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP + * address equal to the netif IP address, looping them back up the stack. + */ +#define LWIP_NETIF_LOOPBACK 1 + +/** + * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback + * sending for each netif (0 = disabled) + */ +#define LWIP_LOOPBACK_MAX_PBUFS 12 + +/* + ------------------------------------ + ---------- LOOPIF options ---------- + ------------------------------------ +*/ +/** + * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c + */ +#define LWIP_HAVE_LOOPIF 1 + +/* + * Should use the default value defined in opt.h + */ + +/** + * MTK_LWIP_DYNAMIC_DEBUG_ENABLE: Support LwIP dynamic debug + * No dependency + */ +#if defined(MTK_LWIP_DYNAMIC_DEBUG_ENABLE) + +struct lwip_debug_flags +{ + char * debug_flag_name; + uint32_t debug_flag; +}; + +extern struct lwip_debug_flags lwip_debug_flags[]; + +#define LWIP_DEBUG LWIP_DBG_ON +#define LWIP_DEBUG_IDX(idx) ((idx) >> 8) + +#undef ETHARP_DEBUG +#undef NETIF_DEBUG +#undef PBUF_DEBUG +#undef API_LIB_DEBUG +#undef API_MSG_DEBUG +#undef SOCKETS_DEBUG +#undef ICMP_DEBUG +#undef IGMP_DEBUG +#undef INET_DEBUG +#undef IP_DEBUG +#undef IP_REASS_DEBUG +#undef RAW_DEBUG +#undef MEM_DEBUG +#undef MEMP_DEBUG +#undef SYS_DEBUG +#undef TIMERS_DEBUG +#undef TCP_DEBUG +#undef TCP_INPUT_DEBUG +#undef TCP_FR_DEBUG +#undef TCP_RTO_DEBUG +#undef TCP_CWND_DEBUG +#undef TCP_WND_DEBUG +#undef TCP_OUTPUT_DEBUG +#undef TCP_RST_DEBUG +#undef TCP_QLEN_DEBUG +#undef UDP_DEBUG +#undef TCPIP_DEBUG +#undef PPP_DEBUG +#undef SLIP_DEBUG +#undef DHCP_DEBUG +#undef AUTOIP_DEBUG +#undef SNMP_MSG_DEBUG +#undef SNMP_MIB_DEBUG +#undef DNS_DEBUG + +#define ETHARP_DEBUG 0x0000U +#define NETIF_DEBUG 0x0100U +#define PBUF_DEBUG 0x0200U +#define API_LIB_DEBUG 0x0300U +#define API_MSG_DEBUG 0x0400U +#define SOCKETS_DEBUG 0x0500U +#define ICMP_DEBUG 0x0600U +#define IGMP_DEBUG 0x0700U +#define INET_DEBUG 0x0800U +#define IP_DEBUG 0x0900U +#define IP_REASS_DEBUG 0x0a00U +#define RAW_DEBUG 0x0b00U +#define MEM_DEBUG 0x0c00U +#define MEMP_DEBUG 0x0d00U +#define SYS_DEBUG 0x0e00U +#define TIMERS_DEBUG 0x0f00U +#define TCP_DEBUG 0x1000U +#define TCP_INPUT_DEBUG 0x1100U +#define TCP_FR_DEBUG 0x1200U +#define TCP_RTO_DEBUG 0x1300U +#define TCP_CWND_DEBUG 0x1400U +#define TCP_WND_DEBUG 0x1500U +#define TCP_OUTPUT_DEBUG 0x1600U +#define TCP_RST_DEBUG 0x1700U +#define TCP_QLEN_DEBUG 0x1800U +#define UDP_DEBUG 0x1900U +#define TCPIP_DEBUG 0x1a00U +#define PPP_DEBUG 0x1b00U +#define SLIP_DEBUG 0x1c00U +#define DHCP_DEBUG 0x1d00U +#define AUTOIP_DEBUG 0x1e00U +#define SNMP_MSG_DEBUG 0x1f00U +#define SNMP_MIB_DEBUG 0x2000U +#define DNS_DEBUG 0x2100U +#endif + +#endif /* __LWIPOPTS_H__ */ diff --git a/src/messaging/ExchangeMessageDispatch.cpp b/src/messaging/ExchangeMessageDispatch.cpp index 5d39fda0dbdc31..1ffbfe3657c6cd 100644 --- a/src/messaging/ExchangeMessageDispatch.cpp +++ b/src/messaging/ExchangeMessageDispatch.cpp @@ -55,16 +55,6 @@ CHIP_ERROR ExchangeMessageDispatch::SendMessage(SessionManager * sessionManager, if (reliableMessageContext->HasPiggybackAckPending()) { payloadHeader.SetAckMessageCounter(reliableMessageContext->TakePendingPeerAckMessageCounter()); - -#if !defined(NDEBUG) - if (!payloadHeader.HasMessageType(Protocols::SecureChannel::MsgType::StandaloneAck)) - { - ChipLogDetail(ExchangeManager, - "Piggybacking Ack for MessageCounter:" ChipLogFormatMessageCounter - " on exchange: " ChipLogFormatExchangeId, - payloadHeader.GetAckMessageCounter().Value(), ChipLogValueExchangeId(exchangeId, isInitiator)); - } -#endif } if (IsReliableTransmissionAllowed() && reliableMessageContext->AutoRequestAck() && diff --git a/src/messaging/ExchangeMgr.cpp b/src/messaging/ExchangeMgr.cpp index 9859854c5d54c0..8f6a16c15fa2fb 100644 --- a/src/messaging/ExchangeMgr.cpp +++ b/src/messaging/ExchangeMgr.cpp @@ -191,11 +191,41 @@ void ExchangeManager::OnMessageReceived(const PacketHeader & packetHeader, const { UnsolicitedMessageHandlerSlot * matchingUMH = nullptr; +#if CHIP_PROGRESS_LOGGING + auto * protocolName = Protocols::GetProtocolName(payloadHeader.GetProtocolID()); + auto * msgTypeName = Protocols::GetMessageTypeName(payloadHeader.GetProtocolID(), payloadHeader.GetMessageType()); + + // + // 32-bit value maximum = 10 chars + text preamble (6) + trailer (1) + null (1) + 2 buffer = 20 + // + char ackBuf[20]; + ackBuf[0] = '\0'; + if (payloadHeader.GetAckMessageCounter().HasValue()) + { + snprintf(ackBuf, sizeof(ackBuf), " (Ack:" ChipLogFormatMessageCounter ")", payloadHeader.GetAckMessageCounter().Value()); + } + + CompressedFabricId compressedFabricId = 0; + if (session->IsSecureSession() && mSessionManager->GetFabricTable() != nullptr) + { + auto fabricInfo = mSessionManager->GetFabricTable()->FindFabricWithIndex(session->AsSecureSession()->GetFabricIndex()); + if (fabricInfo) + { + compressedFabricId = fabricInfo->GetCompressedFabricId(); + } + } + + // + // Legend that can be used to decode this log line can be found in README.md + // ChipLogProgress(ExchangeManager, - "Received message of type " ChipLogFormatMessageType " with protocolId " ChipLogFormatProtocolId - " and MessageCounter:" ChipLogFormatMessageCounter " on exchange " ChipLogFormatExchangeId, - payloadHeader.GetMessageType(), ChipLogValueProtocolId(payloadHeader.GetProtocolID()), - packetHeader.GetMessageCounter(), ChipLogValueExchangeIdFromReceivedHeader(payloadHeader)); + ">>> [E:" ChipLogFormatExchangeId " M:" ChipLogFormatMessageCounter "%s] (%s) Msg RX from %u:" ChipLogFormatX64 + " [%04X] --- Type %04x:%02x (%s:%s)", + ChipLogValueExchangeIdFromReceivedHeader(payloadHeader), packetHeader.GetMessageCounter(), ackBuf, + Transport::GetSessionTypeString(session), session->GetFabricIndex(), + ChipLogValueX64(session->GetPeer().GetNodeId()), static_cast(compressedFabricId), + payloadHeader.GetProtocolID().GetProtocolId(), payloadHeader.GetMessageType(), protocolName, msgTypeName); +#endif MessageFlags msgFlags; if (isDuplicate == DuplicateMessage::Yes) @@ -230,8 +260,8 @@ void ExchangeManager::OnMessageReceived(const PacketHeader & packetHeader, const } else { - ChipLogProgress(ExchangeManager, "Received Groupcast Message with GroupId of %d", - packetHeader.GetDestinationGroupId().Value()); + ChipLogProgress(ExchangeManager, "Received Groupcast Message with GroupId 0x%04X (%d)", + packetHeader.GetDestinationGroupId().Value(), packetHeader.GetDestinationGroupId().Value()); } // Do not handle messages that don't match an existing exchange on an diff --git a/src/messaging/README.md b/src/messaging/README.md new file mode 100644 index 00000000000000..f85a2767b1c8c6 --- /dev/null +++ b/src/messaging/README.md @@ -0,0 +1,90 @@ +# Message Layer + +## Debug Prints + +When progress logging is enabled, the message layer emits a number of prints +that provide more details on the messages being sent or received. Most of these +are fairly self explanatory with the exception of the ones listed below. + +### Message Transmission + +#### Legend + +On message transmission, the following print is emitted. The various fields that +will be expanded are denoted with `$` . + +Unless specified, numerical values are represented in decimal notation. + +``` +<<< [E:$exchange_id M: $msg_id (Ack: $ack_msg_id)] ($msg_category) Msg TX to $fabric_index:$destination [$compressed_fabric_id] --- Type $protocol_id:$msg_type ($protocol_name:$msg_type_name) +``` + +| Field | Description | +| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| exchange_id | Exchange ID + IsInitiator flag from message header ('i' if initiator, 'r' if responder') | +| msg_id | Message counter | +| ack_msg_id | If present, the ACK message counter. Otherwise, this entire field is omitted from display | +| msg_category | U: Un-secure Unicast, S: Secure Unicast, G: Secure Groupcast | +| fabric_index | Fabric index on the sending side | +| destination | 64-bit Node Identifier that can represent both group, operational and temporary node identifiers depending on `$msg_category` (in hex) | +| compressed_fabric_id | If present and valid, lower 16-bits of the compressed fabric ID (in hex). Otherwise, it will be set to 0000. | +| protocol_id | 16-bit Protocol ID within the common vendor namespace (in hex) | +| msg_type | 8-bit message type ID (in hex) | +| protocol_name | If available, a logical name for the protocol | +| msg_type_name | If available, a logical name for the message type | + +#### Examples: + +_Unencrypted Unicast:_ + +``` +<<< [E:26341i M: 264589322] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:30 (SecureChannel:CASE_Sigma1) +``` + +_Secure Unicast:_ + +``` +<<< [E:26347i M: 30642895 (Ack: 9203233)] (S) Msg TX to 1:0000000012344321 [1667] --- Type 0001:06 (IM:WriteRequest) +``` + +_Secure Groupcast:_ + +``` +<<< [E:26349i M: 2000] (G) Msg TX to 1:FFFFFFFFFFFF0102 [1667] --- Type 0001:06 (IM:WriteRequest) +``` + +### Message Reception + +#### Legend + +On message transmission, the following print is emitted. The various fields that +will be expanded are denoted with `$` . + +Unless specified, numerical values are represented in decimal notation. + +``` +>>> [E:$exchange_id M: $msg_id (Ack: $ack_msg_id)] ($msg_category) Msg RX from $fabric_index:$source [$compressed_fabric_id] --- Type $protocol_id:$msg_type ($protocol_name:$msg_type_name) +``` + +This has a similar legend to that for transmission except `$source` denotes the +source's node identifier and `$fabric_index` is the index on the recipient. + +#### Examples + +_Unencrypted Unicast:_ + +``` +>>> [E:26341i M: 264589322] (U) Msg RX from 0:0FDE2AE2EAF5D74D [0000] --- Type 0000:30 (SecureChannel:CASE_Sigma1) +``` + +_Secure Unicast:_ + +``` +>>> [E:26342i M: 30642885] (S) Msg RX from 1:000000000001B669 [1667] --- Type 0001:08 (IM:InvokeCommandRequest) +``` + +_Secure Groupcast:_ + +``` +>>> [E:26349i M: 2000] (G) Msg RX from 1:000000000001B669 [0000] --- Type 0001:06 (IM:WriteRequest) +``` diff --git a/src/messaging/ReliableMessageContext.cpp b/src/messaging/ReliableMessageContext.cpp index d2b47cf52dd64c..06decfc320c41f 100644 --- a/src/messaging/ReliableMessageContext.cpp +++ b/src/messaging/ReliableMessageContext.cpp @@ -91,13 +91,6 @@ void ReliableMessageContext::HandleRcvdAck(uint32_t ackMessageCounter) "CHIP MessageCounter:" ChipLogFormatMessageCounter " not in RetransTable on exchange " ChipLogFormatExchange, ackMessageCounter, ChipLogValueExchange(GetExchangeContext())); } - else - { - ChipLogDetail(ExchangeManager, - "Removed CHIP MessageCounter:" ChipLogFormatMessageCounter - " from RetransTable on exchange " ChipLogFormatExchange, - ackMessageCounter, ChipLogValueExchange(GetExchangeContext())); - } } CHIP_ERROR ReliableMessageContext::HandleNeedsAck(uint32_t messageCounter, BitFlags messageFlags) @@ -179,11 +172,6 @@ CHIP_ERROR ReliableMessageContext::SendStandaloneAckMessage() return CHIP_ERROR_NO_MEMORY; } - // Send the null message - ChipLogDetail(ExchangeManager, - "Sending Standalone Ack for MessageCounter:" ChipLogFormatMessageCounter " on exchange " ChipLogFormatExchange, - mPendingPeerAckMessageCounter, ChipLogValueExchange(GetExchangeContext())); - CHIP_ERROR err = GetExchangeContext()->SendMessage(Protocols::SecureChannel::MsgType::StandaloneAck, std::move(msgBuf), BitFlags{ SendMessageFlags::kNoAutoRequestAck }); if (IsSendErrorNonCritical(err)) diff --git a/src/platform/Ameba/AmebaConfig.cpp b/src/platform/Ameba/AmebaConfig.cpp index 68810da2695aa1..b9ac5d05b789f2 100644 --- a/src/platform/Ameba/AmebaConfig.cpp +++ b/src/platform/Ameba/AmebaConfig.cpp @@ -192,6 +192,8 @@ CHIP_ERROR AmebaConfig::WriteConfigValue(Key key, bool val) success = setPref_new(key.Namespace, key.Name, &value, 1); if (!success) ChipLogError(DeviceLayer, "setPref: %s/%s = %s failed\n", key.Namespace, key.Name, value ? "true" : "false"); + else + ChipLogProgress(DeviceLayer, "NVS set: %s/%s = %s", key.Namespace, key.Name, val ? "true" : "false"); return CHIP_NO_ERROR; } @@ -203,6 +205,8 @@ CHIP_ERROR AmebaConfig::WriteConfigValue(Key key, uint32_t val) success = setPref_new(key.Namespace, key.Name, (uint8_t *) &val, sizeof(uint32_t)); if (!success) ChipLogError(DeviceLayer, "setPref: %s/%s = %d(0x%x) failed\n", key.Namespace, key.Name, val, val); + else + ChipLogProgress(DeviceLayer, "NVS set: %s/%s = %" PRIu32 " (0x%" PRIX32 ")", key.Namespace, key.Name, val, val); return CHIP_NO_ERROR; } @@ -214,6 +218,8 @@ CHIP_ERROR AmebaConfig::WriteConfigValue(Key key, uint64_t val) success = setPref_new(key.Namespace, key.Name, (uint8_t *) &val, sizeof(uint64_t)); if (!success) ChipLogError(DeviceLayer, "setPref: %s/%s = %d(0x%x) failed\n", key.Namespace, key.Name, val, val); + else + ChipLogProgress(DeviceLayer, "NVS set: %s/%s = %" PRIu64 " (0x%" PRIX64 ")", key.Namespace, key.Name, val, val); return CHIP_NO_ERROR; } @@ -225,6 +231,8 @@ CHIP_ERROR AmebaConfig::WriteConfigValueStr(Key key, const char * str) success = setPref_new(key.Namespace, key.Name, (uint8_t *) str, strlen(str) + 1); if (!success) ChipLogError(DeviceLayer, "setPref: %s/%s = %s failed\n", key.Namespace, key.Name, str); + else + ChipLogProgress(DeviceLayer, "NVS set: %s/%s = \"%s\"", key.Namespace, key.Name, str); return CHIP_NO_ERROR; } @@ -251,6 +259,8 @@ CHIP_ERROR AmebaConfig::WriteConfigValueBin(Key key, const uint8_t * data, size_ success = setPref_new(key.Namespace, key.Name, (uint8_t *) data, dataLen); if (!success) ChipLogError(DeviceLayer, "setPref: %s/%s failed\n", key.Namespace, key.Name); + else + ChipLogProgress(DeviceLayer, "NVS set: %s/%s = (blob length %" PRId32 ")", key.Namespace, key.Name, dataLen); return CHIP_NO_ERROR; } @@ -262,6 +272,8 @@ CHIP_ERROR AmebaConfig::ClearConfigValue(Key key) success = deleteKey(key.Namespace, key.Name); if (!success) ChipLogProgress(DeviceLayer, "%s : %s/%s failed\n", __FUNCTION__, key.Namespace, key.Name); + else + ChipLogProgress(DeviceLayer, "NVS erase: %s/%s", key.Namespace, key.Name); return CHIP_NO_ERROR; } diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 30d9c58d795749..fbfe42faec32a4 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -273,6 +273,12 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { "CHIP_DEVICE_LAYER_TARGET=Beken", "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}", ] + } else if (chip_device_platform == "mt793x") { + defines += [ + "CHIP_DEVICE_LAYER_TARGET_MT793X=1", + "CHIP_DEVICE_LAYER_TARGET=mt793x", + "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}", + ] } if (chip_device_config_device_software_version_string != "") { @@ -446,6 +452,8 @@ if (chip_device_platform != "none") { _platform_target = "Zephyr" } else if (chip_device_platform == "beken") { _platform_target = "Beken" + } else if (chip_device_platform == "mt793x") { + _platform_target = "mt793x" } else { assert(false, "Unknown chip_device_platform: ${chip_device_platform}") } diff --git a/src/platform/Darwin/BUILD.gn b/src/platform/Darwin/BUILD.gn index 29fddf18d99e1d..da17b8af7042a6 100644 --- a/src/platform/Darwin/BUILD.gn +++ b/src/platform/Darwin/BUILD.gn @@ -24,6 +24,7 @@ config("darwin_config") { "CoreFoundation.framework", "CoreBluetooth.framework", "Foundation.framework", + "Network.framework", ] if (current_os == "mac") { diff --git a/src/platform/Darwin/DnssdContexts.cpp b/src/platform/Darwin/DnssdContexts.cpp index b3771bb980808b..4128bfa24e431c 100644 --- a/src/platform/Darwin/DnssdContexts.cpp +++ b/src/platform/Darwin/DnssdContexts.cpp @@ -272,23 +272,10 @@ void RegisterContext::DispatchSuccess() { std::string typeWithoutSubTypes = GetFullTypeWithoutSubTypes(mType); callback(context, typeWithoutSubTypes.c_str(), mInstanceName.c_str(), CHIP_NO_ERROR); -} -RegisterRecordContext::RegisterRecordContext(RegisterContext * context) -{ - type = ContextType::RegisterRecord; - mRegisterContext = context; -} - -void RegisterRecordContext::DispatchFailure(DNSServiceErrorType err) -{ - mRegisterContext->Finalize(err); - MdnsContexts::GetInstance().Remove(this); -} - -void RegisterRecordContext::DispatchSuccess() -{ - mRegisterContext->Finalize(); + // Once a service has been properly published it is normally unreachable because the hostname has not yet been + // registered against the dns daemon. Register the records mapping the hostname to our IP. + mHostNameRegistrar.Register(); } BrowseContext::BrowseContext(void * cbContext, DnssdBrowseCallback cb, DnssdServiceProtocol cbContextProtocol) diff --git a/src/platform/Darwin/DnssdHostNameRegistrar.cpp b/src/platform/Darwin/DnssdHostNameRegistrar.cpp index d4d25fd61ab200..2e63ff26d2f73d 100644 --- a/src/platform/Darwin/DnssdHostNameRegistrar.cpp +++ b/src/platform/Darwin/DnssdHostNameRegistrar.cpp @@ -17,6 +17,7 @@ #include "DnssdHostNameRegistrar.h" #include "DnssdImpl.h" +#include "MdnsError.h" #include #include @@ -24,6 +25,10 @@ #include #include +#include + +#include + constexpr DNSServiceFlags kRegisterRecordFlags = kDNSServiceFlagsShared; namespace chip { @@ -31,172 +36,352 @@ namespace Dnssd { namespace { -static void OnRegisterRecord(DNSServiceRef sdRef, DNSRecordRef recordRef, DNSServiceFlags flags, DNSServiceErrorType err, - void * context) +#if CHIP_DETAIL_LOGGING +constexpr const char * kPathStatusInvalid = "Invalid"; +constexpr const char * kPathStatusUnsatisfied = "Unsatisfied"; +constexpr const char * kPathStatusSatisfied = "Satisfied"; +constexpr const char * kPathStatusSatisfiable = "Satisfiable"; +constexpr const char * kPathStatusUnknown = "Unknown"; + +constexpr const char * kInterfaceTypeCellular = "Cellular"; +constexpr const char * kInterfaceTypeWiFi = "WiFi"; +constexpr const char * kInterfaceTypeWired = "Wired"; +constexpr const char * kInterfaceTypeLoopback = "Loopback"; +constexpr const char * kInterfaceTypeOther = "Other"; +constexpr const char * kInterfaceTypeUnknown = "Unknown"; + +const char * GetPathStatusString(nw_path_status_t status) { - ChipLogDetail(Discovery, "Mdns: %s flags: %d", __func__, flags); - - auto sdCtx = reinterpret_cast(context); + const char * str = nullptr; - auto & registrar = sdCtx->mRegisterContext->mHostNameRegistrar; - if (!registrar.IncrementRegistrationCount(err)) + if (status == nw_path_status_invalid) { - sdCtx->Finalize(registrar.HasRegisteredRegistrant() ? kDNSServiceErr_NoError : kDNSServiceErr_Unknown); + str = kPathStatusInvalid; + } + else if (status == nw_path_status_unsatisfied) + { + str = kPathStatusUnsatisfied; + } + else if (status == nw_path_status_satisfied) + { + str = kPathStatusSatisfied; + } + else if (status == nw_path_status_satisfiable) + { + str = kPathStatusSatisfiable; + } + else + { + str = kPathStatusUnknown; } -} -} // namespace + return str; +} -bool InterfaceRegistrant::Init(const struct ifaddrs * ifa, Inet::IPAddressType addressType, uint32_t interfaceId) +const char * GetInterfaceTypeString(nw_interface_type_t type) { - VerifyOrReturnValue(ifa != nullptr, false); - VerifyOrReturnValue(ifa->ifa_addr != nullptr, false); - VerifyOrReturnValue(HasValidFlags(ifa->ifa_flags), false); - VerifyOrReturnValue(IsValidInterfaceId(interfaceId, if_nametoindex(ifa->ifa_name)), false); - VerifyOrReturnValue(HasValidType(addressType, ifa->ifa_addr->sa_family), false); + const char * str = nullptr; - // The incoming interface id can be kDNSServiceInterfaceIndexAny, but here what needs to be done is to - // associate a given ip with a specific interface id, so the incoming interface id is used as a hint - // to validate if the current interface is of interest or not, but it is not what is stored internally. - mInterfaceId = if_nametoindex(ifa->ifa_name); - mInterfaceAddressType = ifa->ifa_addr->sa_family; - - if (IsIPv4()) + if (type == nw_interface_type_cellular) + { + str = kInterfaceTypeCellular; + } + else if (type == nw_interface_type_wifi) { - mInterfaceAddress.ipv4 = reinterpret_cast(ifa->ifa_addr)->sin_addr; + str = kInterfaceTypeWiFi; + } + else if (type == nw_interface_type_wired) + { + str = kInterfaceTypeWired; + } + else if (type == nw_interface_type_loopback) + { + str = kInterfaceTypeLoopback; + } + else if (type == nw_interface_type_other) + { + str = kInterfaceTypeOther; } else { - mInterfaceAddress.ipv6 = reinterpret_cast(ifa->ifa_addr)->sin6_addr; + str = kInterfaceTypeUnknown; } - return true; + return str; } -DNSServiceErrorType InterfaceRegistrant::Register(DNSServiceRef sdRef, RegisterRecordContext * sdCtx, const char * hostname) const +void LogDetails(uint32_t interfaceId, InetInterfacesVector inetInterfaces, Inet6InterfacesVector inet6Interfaces) { - LogDetail(); + for (auto & inetInterface : inetInterfaces) + { + if (interfaceId == inetInterface.first) + { + char addr[INET_ADDRSTRLEN] = {}; + inet_ntop(AF_INET, &inetInterface.second, addr, sizeof(addr)); + ChipLogDetail(Discovery, "\t\t* ipv4: %s", addr); + } + } - uint16_t rrtype = IsIPv4() ? kDNSServiceType_A : kDNSServiceType_AAAA; - uint16_t rdlen = IsIPv4() ? sizeof(in_addr) : sizeof(in6_addr); - const void * rdata = IsIPv4() ? static_cast(GetIPv4()) : static_cast(GetIPv6()); + for (auto & inet6Interface : inet6Interfaces) + { + if (interfaceId == inet6Interface.first) + { + char addr[INET6_ADDRSTRLEN] = {}; + inet_ntop(AF_INET6, &inet6Interface.second, addr, sizeof(addr)); + ChipLogDetail(Discovery, "\t\t* ipv6: %s", addr); + } + } +} - DNSRecordRef dnsRecordRef; - return DNSServiceRegisterRecord(sdRef, &dnsRecordRef, kRegisterRecordFlags, mInterfaceId, hostname, rrtype, kDNSServiceClass_IN, - rdlen, rdata, 0, OnRegisterRecord, sdCtx); +void LogDetails(nw_path_t path) +{ + auto status = nw_path_get_status(path); + ChipLogDetail(Discovery, "Status: %s", GetPathStatusString(status)); } -bool InterfaceRegistrant::HasValidFlags(unsigned int flags) +void LogDetails(InetInterfacesVector inetInterfaces, Inet6InterfacesVector inet6Interfaces) { - return !(flags & IFF_POINTOPOINT) && (flags & IFF_RUNNING) && (flags & IFF_MULTICAST); + std::set interfaceIds; + for (auto & inetInterface : inetInterfaces) + { + interfaceIds.insert(inetInterface.first); + } + + for (auto & inet6Interface : inet6Interfaces) + { + interfaceIds.insert(inet6Interface.first); + } + + for (auto interfaceId : interfaceIds) + { + char interfaceName[IFNAMSIZ] = {}; + if_indextoname(interfaceId, interfaceName); + ChipLogDetail(Discovery, "\t%s (%u)", interfaceName, interfaceId); + LogDetails(interfaceId, inetInterfaces, inet6Interfaces); + } } -bool InterfaceRegistrant::HasValidType(Inet::IPAddressType addressType, const sa_family_t addressFamily) +void LogDetails(nw_interface_t interface, InetInterfacesVector inetInterfaces, Inet6InterfacesVector inet6Interfaces) { - bool useIPv4 = addressType == Inet::IPAddressType::kIPv4 || addressType == Inet::IPAddressType::kAny; - bool useIPv6 = addressType == Inet::IPAddressType::kIPv6 || addressType == Inet::IPAddressType::kAny; + auto interfaceId = nw_interface_get_index(interface); + auto interfaceName = nw_interface_get_name(interface); + auto interfaceType = nw_interface_get_type(interface); + ChipLogDetail(Discovery, "\t%s (%u / %s)", interfaceName, interfaceId, GetInterfaceTypeString(interfaceType)); + LogDetails(interfaceId, inetInterfaces, inet6Interfaces); +} +#endif // CHIP_DETAIL_LOGGING - return (useIPv6 && addressFamily == AF_INET6) || (useIPv4 && addressFamily == AF_INET); +bool HasValidFlags(unsigned int flags, bool allowLoopbackOnly) +{ + VerifyOrReturnValue(!allowLoopbackOnly || (flags & IFF_LOOPBACK), false); + VerifyOrReturnValue(!(flags & IFF_POINTOPOINT), false); + VerifyOrReturnValue((flags & IFF_RUNNING), false); + VerifyOrReturnValue((flags & IFF_MULTICAST), false); + return true; +} + +bool HasValidNetworkType(nw_interface_t interface) +{ + auto interfaceType = nw_interface_get_type(interface); + return interfaceType == nw_interface_type_wifi || interfaceType == nw_interface_type_wired; } -bool InterfaceRegistrant::IsValidInterfaceId(uint32_t targetInterfaceId, unsigned int currentInterfaceId) +bool IsValidInterfaceId(uint32_t targetInterfaceId, nw_interface_t interface) { + auto currentInterfaceId = nw_interface_get_index(interface); return targetInterfaceId == kDNSServiceInterfaceIndexAny || targetInterfaceId == currentInterfaceId; } -void InterfaceRegistrant::LogDetail() const +void ShouldUseVersion(chip::Inet::IPAddressType addressType, bool & shouldUseIPv4, bool & shouldUseIPv6) { - char interfaceName[IFNAMSIZ] = {}; - VerifyOrReturn(if_indextoname(mInterfaceId, interfaceName) != nullptr); +#if INET_CONFIG_ENABLE_IPV4 + shouldUseIPv4 = addressType == Inet::IPAddressType::kIPv4 || addressType == Inet::IPAddressType::kAny; +#else + shouldUseIPv4 = false; +#endif // INET_CONFIG_ENABLE_IPV4 + shouldUseIPv6 = addressType == Inet::IPAddressType::kIPv6 || addressType == Inet::IPAddressType::kAny; +} - if (IsIPv4()) - { - char addr[INET_ADDRSTRLEN] = {}; - inet_ntop(AF_INET, GetIPv4(), addr, sizeof(addr)); - ChipLogDetail(Discovery, "\tInterface: %s (%u) ipv4: %s", interfaceName, mInterfaceId, addr); - } - else +static void OnRegisterRecord(DNSServiceRef sdRef, DNSRecordRef recordRef, DNSServiceFlags flags, DNSServiceErrorType err, + void * context) +{ + ChipLogDetail(Discovery, "Mdns: %s flags: %d", __func__, flags); + if (kDNSServiceErr_NoError != err) { - char addr[INET6_ADDRSTRLEN] = {}; - inet_ntop(AF_INET6, GetIPv6(), addr, sizeof(addr)); - ChipLogDetail(Discovery, "\tInterface: %s (%u) ipv6: %s", interfaceName, mInterfaceId, addr); + ChipLogError(Discovery, "%s (%s)", __func__, Error::ToString(err)); } } -bool HostNameRegistrar::Init(const char * hostname, Inet::IPAddressType addressType, uint32_t interfaceId) +void GetInterfaceAddresses(uint32_t interfaceId, chip::Inet::IPAddressType addressType, InetInterfacesVector & inetInterfaces, + Inet6InterfacesVector & inet6Interfaces, bool searchLoopbackOnly = false) { - mHostName = hostname; - - // When the target interface is kDNSServiceInterfaceIndexLocalOnly, there is no need to map the hostname to - // an IP address. - VerifyOrReturnValue(interfaceId != kDNSServiceInterfaceIndexLocalOnly, true); + bool shouldUseIPv4, shouldUseIPv6; + ShouldUseVersion(addressType, shouldUseIPv4, shouldUseIPv6); - struct ifaddrs * ifap; - VerifyOrReturnValue(getifaddrs(&ifap) >= 0, false); + ifaddrs * ifap; + VerifyOrReturn(getifaddrs(&ifap) >= 0); - for (struct ifaddrs * ifa = ifap; ifa; ifa = ifa->ifa_next) + for (struct ifaddrs * ifa = ifap; ifa != nullptr; ifa = ifa->ifa_next) { - InterfaceRegistrant registrant; - if (registrant.Init(ifa, addressType, interfaceId)) + auto interfaceAddress = ifa->ifa_addr; + if (interfaceAddress == nullptr) { - mRegistry.push_back(registrant); + continue; + } + + if (!HasValidFlags(ifa->ifa_flags, searchLoopbackOnly)) + { + continue; + } + + auto currentInterfaceId = if_nametoindex(ifa->ifa_name); + if (interfaceId != kDNSServiceInterfaceIndexAny && interfaceId != currentInterfaceId) + { + continue; + } + + if (shouldUseIPv4 && (AF_INET == interfaceAddress->sa_family)) + { + auto inetAddress = reinterpret_cast(interfaceAddress)->sin_addr; + inetInterfaces.push_back(InetInterface(currentInterfaceId, inetAddress)); + } + else if (shouldUseIPv6 && (AF_INET6 == interfaceAddress->sa_family)) + { + auto inet6Address = reinterpret_cast(interfaceAddress)->sin6_addr; + inet6Interfaces.push_back(Inet6Interface(currentInterfaceId, inet6Address)); } } freeifaddrs(ifap); +} +} // namespace - return mRegistry.size() != 0; +void HostNameRegistrar::Init(const char * hostname, Inet::IPAddressType addressType, uint32_t interfaceId) +{ + mHostname = hostname; + mInterfaceId = interfaceId; + mAddressType = addressType; + mServiceRef = nullptr; + mInterfaceMonitor = nullptr; } -CHIP_ERROR HostNameRegistrar::Register(RegisterContext * registerCtx) +CHIP_ERROR HostNameRegistrar::Register() { // If the target interface is kDNSServiceInterfaceIndexLocalOnly, there are no interfaces to register against // the dns daemon. - if (mRegistry.size() == 0) - { - return registerCtx->Finalize(); - } + VerifyOrReturnError(!IsLocalOnly(), CHIP_NO_ERROR); + + return StartMonitorInterfaces(^(InetInterfacesVector inetInterfaces, Inet6InterfacesVector inet6Interfaces) { + ReturnOnFailure(StartSharedConnection()); + RegisterInterfaces(inetInterfaces, kDNSServiceType_A); + RegisterInterfaces(inet6Interfaces, kDNSServiceType_AAAA); + }); +} + +CHIP_ERROR HostNameRegistrar::RegisterInterface(uint32_t interfaceId, uint16_t rtype, const void * rdata, uint16_t rdlen) +{ + DNSRecordRef dnsRecordRef; + auto err = DNSServiceRegisterRecord(mServiceRef, &dnsRecordRef, kRegisterRecordFlags, interfaceId, mHostname.c_str(), rtype, + kDNSServiceClass_IN, rdlen, rdata, 0, OnRegisterRecord, nullptr); + return Error::ToChipError(err); +} + +void HostNameRegistrar::Unregister() +{ + // If the target interface is kDNSServiceInterfaceIndexLocalOnly, there are no interfaces to register against + // the dns daemon. + VerifyOrReturn(!IsLocalOnly()); + + StopMonitorInterfaces(); + StopSharedConnection(); +} + +CHIP_ERROR HostNameRegistrar::StartMonitorInterfaces(OnInterfaceChanges interfaceChangesBlock) +{ + mInterfaceMonitor = nw_path_monitor_create(); + VerifyOrReturnError(mInterfaceMonitor != nullptr, CHIP_ERROR_NO_MEMORY); - DNSServiceRef sdRef; - auto err = DNSServiceCreateConnection(&sdRef); - VerifyOrReturnError(kDNSServiceErr_NoError == err, CHIP_ERROR_INTERNAL); + nw_path_monitor_set_queue(mInterfaceMonitor, chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue()); - RegisterRecordContext * sdCtx = Platform::New(registerCtx); - VerifyOrReturnError(nullptr != sdCtx, CHIP_ERROR_NO_MEMORY); + nw_path_monitor_set_update_handler(mInterfaceMonitor, ^(nw_path_t path) { +#if CHIP_DETAIL_LOGGING + LogDetails(path); +#endif // CHIP_DETAIL_LOGGING - ChipLogDetail(Discovery, "Mdns: Mapping %s to:", mHostName.c_str()); + __block InetInterfacesVector inet; + __block Inet6InterfacesVector inet6; - for (auto & registrant : mRegistry) - { - err = registrant.Register(sdRef, sdCtx, mHostName.c_str()); + // The loopback interfaces needs to be manually added. While lo0 is usually 1, this is not guaranteed. So search for a + // loopback interface with the specified interface id. If the specified interface id is kDNSServiceInterfaceIndexAny, it + // will look for all available loopback interfaces. + GetInterfaceAddresses(mInterfaceId, mAddressType, inet, inet6, true /* searchLoopbackOnly */); +#if CHIP_DETAIL_LOGGING + LogDetails(inet, inet6); +#endif // CHIP_DETAIL_LOGGING - // An error to register a particular registrant is not fatal unless all registrants have failed. - // Otherwise, if there is an errror, it indicates that this registrant will not trigger a callback - // with its registration status. So we take the registration failure into account here. - if (kDNSServiceErr_NoError != err) + auto status = nw_path_get_status(path); + if (status == nw_path_status_satisfied) { - VerifyOrReturnError(IncrementRegistrationCount(err), sdCtx->Finalize(err)); + nw_path_enumerate_interfaces(path, ^(nw_interface_t interface) { + VerifyOrReturnValue(HasValidNetworkType(interface), true); + VerifyOrReturnValue(IsValidInterfaceId(mInterfaceId, interface), true); + + auto targetInterfaceId = nw_interface_get_index(interface); + GetInterfaceAddresses(targetInterfaceId, mAddressType, inet, inet6); +#if CHIP_DETAIL_LOGGING + LogDetails(interface, inet, inet6); +#endif // CHIP_DETAIL_LOGGING + return true; + }); } - } - return MdnsContexts::GetInstance().Add(sdCtx, sdRef); + interfaceChangesBlock(inet, inet6); + }); + + nw_path_monitor_start(mInterfaceMonitor); + + return CHIP_NO_ERROR; } -bool HostNameRegistrar::IncrementRegistrationCount(DNSServiceErrorType err) +void HostNameRegistrar::StopMonitorInterfaces() { - mRegistrationCount++; - VerifyOrDie(mRegistrationCount <= mRegistry.size()); + if (mInterfaceMonitor != nullptr) + { + nw_path_monitor_cancel(mInterfaceMonitor); + nw_release(mInterfaceMonitor); + mInterfaceMonitor = nullptr; + } +} - // A single registration success is enough to consider the whole process a success. - // This is very permissive in the sense that the interface that has succeeded may not be - // enough to do anything useful, but on the other hand, the failure of a single interface - // to successfuly registered does not makes it obvious that it won't work. - if (kDNSServiceErr_NoError == err) +CHIP_ERROR HostNameRegistrar::StartSharedConnection() +{ + auto err = DNSServiceCreateConnection(&mServiceRef); + VerifyOrReturnValue(kDNSServiceErr_NoError == err, Error::ToChipError(err)); + + err = DNSServiceSetDispatchQueue(mServiceRef, chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue()); + if (kDNSServiceErr_NoError != err) { - mRegistrationSuccess = true; + StopSharedConnection(); } - return mRegistrationCount != mRegistry.size(); + return Error::ToChipError(err); +} + +void HostNameRegistrar::StopSharedConnection() +{ + if (mServiceRef != nullptr) + { + // All the DNSRecordRefs registered to the shared DNSServiceRef will be deallocated. + DNSServiceRefDeallocate(mServiceRef); + mServiceRef = nullptr; + } +} + +CHIP_ERROR HostNameRegistrar::ResetSharedConnection() +{ + StopSharedConnection(); + ReturnLogErrorOnFailure(StartSharedConnection()); + return CHIP_NO_ERROR; } } // namespace Dnssd diff --git a/src/platform/Darwin/DnssdHostNameRegistrar.h b/src/platform/Darwin/DnssdHostNameRegistrar.h index 2b23c3cdb81593..ae6b7efa0f937b 100644 --- a/src/platform/Darwin/DnssdHostNameRegistrar.h +++ b/src/platform/Darwin/DnssdHostNameRegistrar.h @@ -23,80 +23,53 @@ #include #include +#include + namespace chip { namespace Dnssd { -struct RegisterContext; -struct RegisterRecordContext; - -class InterfaceRegistrant -{ -public: - /** - * Initialize an interface if it match filtering arguments. - * - * @param[in] ifa The interface to initialize from. - * @param[in] addressType An allowed address type. - * Passing in Inet::IPAddressType::kAny effectively allow all address types. - * @param[in] interfaceId An allowed interface id. - * Passing in kDNSServiceInterfaceIndexAny effectively allow all interface ids. - * - * @return A boolean indicating if the initialization from the data of the ifaddrs was allowed by the filtering parameters. - */ - bool Init(const struct ifaddrs * ifa, Inet::IPAddressType addressType, uint32_t interfaceId); - - DNSServiceErrorType Register(DNSServiceRef sdRef, RegisterRecordContext * sdCtx, const char * hostname) const; - -private: - static bool HasValidFlags(unsigned int flags); - static bool HasValidType(Inet::IPAddressType addressType, const sa_family_t addressFamily); - static bool IsValidInterfaceId(uint32_t targetInterfaceId, unsigned int currentInterfaceId); - - const struct in_addr * GetIPv4() const { return &mInterfaceAddress.ipv4; } - const struct in6_addr * GetIPv6() const { return &mInterfaceAddress.ipv6; } - - bool IsIPv4() const { return mInterfaceAddressType == AF_INET; }; - bool IsIPv6() const { return mInterfaceAddressType == AF_INET6; }; - - void LogDetail() const; - - union InterfaceAddress - { - struct in_addr ipv4; - struct in6_addr ipv6; - }; + typedef std::pair InetInterface; + typedef std::pair Inet6Interface; + typedef std::vector InetInterfacesVector; + typedef std::vector> Inet6InterfacesVector; + typedef void (^OnInterfaceChanges)(InetInterfacesVector inetInterfaces, Inet6InterfacesVector inet6Interfaces); + + class HostNameRegistrar { + public: + void Init(const char * hostname, Inet::IPAddressType addressType, uint32_t interfaceId); + + CHIP_ERROR Register(); + void Unregister(); + + private: + bool IsLocalOnly() const { return mInterfaceId == kDNSServiceInterfaceIndexLocalOnly; }; + + template void RegisterInterfaces(std::vector> interfaces, uint16_t type) + { + for (auto & interface : interfaces) { + auto interfaceId = interface.first; + auto interfaceAddress = static_cast(&interface.second); + auto interfaceAddressLen = sizeof(interface.second); - uint32_t mInterfaceId; - InterfaceAddress mInterfaceAddress; - sa_family_t mInterfaceAddressType; -}; - -class HostNameRegistrar -{ -public: - bool Init(const char * hostname, Inet::IPAddressType addressType, uint32_t interfaceId); - - CHIP_ERROR Register(RegisterContext * registerCtx); - - /** - * IncrementRegistrationCount is used to indicate a registrant status. - * When all registrants status has been recovered, it returns false to indicate - * that the registration process is finished. - * - * @param[in] err The registration status - * - * @return A boolean indicating if the registration process needs to continue. - */ - bool IncrementRegistrationCount(DNSServiceErrorType err); - - bool HasRegisteredRegistrant() { return mRegistrationSuccess; } - -private: - std::string mHostName; - std::vector mRegistry; - uint8_t mRegistrationCount = 0; - bool mRegistrationSuccess = false; -}; + LogErrorOnFailure(RegisterInterface(interfaceId, type, interfaceAddress, interfaceAddressLen)); + } + } + + CHIP_ERROR RegisterInterface(uint32_t interfaceId, uint16_t rtype, const void * rdata, uint16_t rdlen); + + CHIP_ERROR StartSharedConnection(); + void StopSharedConnection(); + CHIP_ERROR ResetSharedConnection(); + DNSServiceRef mServiceRef; + + CHIP_ERROR StartMonitorInterfaces(OnInterfaceChanges interfaceChangesBlock); + void StopMonitorInterfaces(); + nw_path_monitor_t mInterfaceMonitor; + + std::string mHostname; + uint32_t mInterfaceId; + Inet::IPAddressType mAddressType; + }; } // namespace Dnssd } // namespace chip diff --git a/src/platform/Darwin/DnssdImpl.cpp b/src/platform/Darwin/DnssdImpl.cpp index ea370fcdf7c96d..c8c94ca174baa7 100644 --- a/src/platform/Darwin/DnssdImpl.cpp +++ b/src/platform/Darwin/DnssdImpl.cpp @@ -173,11 +173,7 @@ static void OnRegister(DNSServiceRef sdRef, DNSServiceFlags flags, DNSServiceErr ChipLogDetail(Discovery, "Mdns: %s name: %s, type: %s, domain: %s, flags: %d", __func__, name, type, domain, flags); auto sdCtx = reinterpret_cast(context); - VerifyOrReturn(kDNSServiceErr_NoError == err, sdCtx->Finalize(err)); - - // Once a service has been properly published it is normally unreachable because the hostname has not been yet - // registered against the dns daemon. Register the records mapping the hostname to our IP. - sdCtx->mHostNameRegistrar.Register(sdCtx); + sdCtx->Finalize(err); }; CHIP_ERROR Register(void * context, DnssdPublishCallback callback, uint32_t interfaceId, const char * type, const char * name, @@ -197,8 +193,7 @@ CHIP_ERROR Register(void * context, DnssdPublishCallback callback, uint32_t inte sdCtx = chip::Platform::New(type, name, callback, context); VerifyOrReturnError(nullptr != sdCtx, CHIP_ERROR_NO_MEMORY); - VerifyOrReturnError(sdCtx->mHostNameRegistrar.Init(hostname, addressType, interfaceId), - sdCtx->Finalize(kDNSServiceErr_BadInterfaceIndex)); + sdCtx->mHostNameRegistrar.Init(hostname, addressType, interfaceId); DNSServiceRef sdRef; auto err = DNSServiceRegister(&sdRef, kRegisterFlags, interfaceId, name, type, kLocalDot, hostname, ntohs(port), record.size(), @@ -394,15 +389,6 @@ CHIP_ERROR ChipDnssdRemoveServices() { err = CHIP_NO_ERROR; } - ReturnErrorOnFailure(err); - - err = MdnsContexts::GetInstance().RemoveAllOfType(ContextType::RegisterRecord); - if (CHIP_ERROR_KEY_NOT_FOUND == err) - { - err = CHIP_NO_ERROR; - } - ReturnErrorOnFailure(err); - return err; } diff --git a/src/platform/Darwin/DnssdImpl.h b/src/platform/Darwin/DnssdImpl.h index d6bb8246703d9a..b60a8c97c6bc90 100644 --- a/src/platform/Darwin/DnssdImpl.h +++ b/src/platform/Darwin/DnssdImpl.h @@ -32,7 +32,6 @@ namespace Dnssd { enum class ContextType { Register, - RegisterRecord, Browse, Resolve, }; @@ -99,7 +98,7 @@ struct RegisterContext : public GenericContext HostNameRegistrar mHostNameRegistrar; RegisterContext(const char * sType, const char * instanceName, DnssdPublishCallback cb, void * cbContext); - virtual ~RegisterContext() {} + virtual ~RegisterContext() { mHostNameRegistrar.Unregister(); } void DispatchFailure(DNSServiceErrorType err) override; void DispatchSuccess() override; @@ -107,17 +106,6 @@ struct RegisterContext : public GenericContext bool matches(const char * sType) { return mType.compare(sType) == 0; } }; -struct RegisterRecordContext : public GenericContext -{ - RegisterContext * mRegisterContext; - - RegisterRecordContext(RegisterContext * context); - virtual ~RegisterRecordContext(){}; - - void DispatchFailure(DNSServiceErrorType err) override; - void DispatchSuccess() override; -}; - struct BrowseContext : public GenericContext { DnssdBrowseCallback callback; diff --git a/src/platform/Infineon/CYW30739/CHIPPlatformConfig.h b/src/platform/Infineon/CYW30739/CHIPPlatformConfig.h index 3f9f965e4e4f55..12ee433af8c27d 100644 --- a/src/platform/Infineon/CYW30739/CHIPPlatformConfig.h +++ b/src/platform/Infineon/CYW30739/CHIPPlatformConfig.h @@ -23,7 +23,7 @@ #pragma once -#define CHIP_CONFIG_MAX_FABRICS 4 +#define CHIP_CONFIG_MAX_FABRICS 5 #define CHIP_CONFIG_UNAUTHENTICATED_CONNECTION_POOL_SIZE 10 #define CHIP_DEVICE_CONFIG_ENABLE_JUST_IN_TIME_PROVISIONING 1 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_COMMISSIONABLE_DISCOVERY 1 diff --git a/src/platform/device.gni b/src/platform/device.gni index 8343c4394f7eb0..f32ac03265b35b 100755 --- a/src/platform/device.gni +++ b/src/platform/device.gni @@ -64,7 +64,7 @@ declare_args() { chip_device_platform == "android" || chip_device_platform == "ameba" || chip_device_platform == "webos" || chip_device_platform == "cc32xx" || chip_device_platform == "bl602" || chip_device_platform == "mw320" || - chip_device_platform == "beken" || + chip_device_platform == "beken" || chip_device_platform == "mt793x" || (chip_device_platform == "darwin" && current_os == "mac") # Enable ble support. @@ -85,7 +85,8 @@ declare_args() { chip_device_platform == "mbed" || chip_device_platform == "psoc6" || chip_device_platform == "ameba" || chip_device_platform == "webos" || chip_device_platform == "cc32xx" || chip_device_platform == "bl602" || - chip_device_platform == "mw320" || chip_device_platform == "beken") { + chip_device_platform == "mw320" || chip_device_platform == "beken" || + chip_device_platform == "mt793x") { chip_mdns = "minimal" } else if (chip_device_platform == "darwin" || chip_device_platform == "cc13x2_26x2" || current_os == "android" || @@ -148,6 +149,8 @@ if (chip_device_platform == "cc13x2_26x2") { _chip_device_layer = "Zephyr" } else if (chip_device_platform == "beken") { _chip_device_layer = "Beken" +} else if (chip_device_platform == "mt793x") { + _chip_device_layer = "mt793x" } if (chip_device_platform != "external") { @@ -208,5 +211,6 @@ assert( chip_device_platform == "ameba" || chip_device_platform == "cyw30739" || chip_device_platform == "webos" || chip_device_platform == "bl602" || chip_device_platform == "mw320" || chip_device_platform == "zephyr" || - chip_device_platform == "beken" || chip_device_platform == "bl702", + chip_device_platform == "beken" || chip_device_platform == "bl702" || + chip_device_platform == "mt793x", "Please select a valid value for chip_device_platform") diff --git a/src/platform/mt793x/BLEGattProfile.c b/src/platform/mt793x/BLEGattProfile.c new file mode 100644 index 00000000000000..a8f2ebf9c1ace0 --- /dev/null +++ b/src/platform/mt793x/BLEGattProfile.c @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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 of the BLEManager singleton object + * for the MediaTek Genio platforms. + */ + +#include "BLEManagerImpl.h" +#include "bt_gap_le.h" +#include "bt_gatts.h" +#include "bt_uuid.h" + +#define CHIPOBLEPROFILE_SERVICE_UUID_16 (0xFFF6) +#define CHIPOBLEPROFILE_CHAR_UUID_RX \ + { \ + 0x11, 0x9D, 0x9F, 0x42, 0x9C, 0x4F, 0x9F, 0x95, 0x59, 0x45, 0x3D, 0x26, 0xF5, 0x2E, 0xEE, 0x18 \ + } +#define CHIPOBLEPROFILE_CHAR_UUID_TX \ + { \ + 0x12, 0x9D, 0x9F, 0x42, 0x9C, 0x4F, 0x9F, 0x95, 0x59, 0x45, 0x3D, 0x26, 0xF5, 0x2E, 0xEE, 0x18 \ + } + +const bt_uuid_t CHIPOBLEPROFILE_CHAR_SERVER_TX_UUID128 = { CHIPOBLEPROFILE_CHAR_UUID_TX }; +const bt_uuid_t CHIPOBLEPROFILE_CHAR_SERVER_RX_UUID128 = { CHIPOBLEPROFILE_CHAR_UUID_RX }; + +CHIPoBLECharCallback CHIPoBLEProfile_read_callback = NULL; +CHIPoBLECharCallback CHIPoBLEProfile_write_callback = NULL; +CHIPoBLECharCallback CHIPoBLEProfile_ccc_callback = NULL; + +uint32_t ble_tx_charc_value_callback(const uint8_t rw, uint16_t handle, void * data, uint16_t size, uint16_t offset) +{ + printf("ble_tx_charc_value_callback: %d %d %p %d %d\n", rw, handle, data, size, offset); + if (CHIPoBLEProfile_read_callback) + { + CHIPoBLEProfile_read_callback(handle, data, size); + } + + return size; +} + +uint32_t ble_rx_charc_callback(const uint8_t rw, uint16_t handle, void * data, uint16_t size, uint16_t offset) +{ + printf("ble_rx_charc_callback: %d %d %p %d %d\n", rw, handle, data, size, offset); + if (CHIPoBLEProfile_write_callback) + { + CHIPoBLEProfile_write_callback(handle, data, size); + } + + return size; +} + +uint32_t ble_tx_ccc_callback(const uint8_t rw, uint16_t handle, void * data, uint16_t size, uint16_t offset) +{ + printf("ble_tx_ccc_callback: %d %d %p %d %d\n", rw, handle, data, size, offset); + if (CHIPoBLEProfile_ccc_callback) + { + CHIPoBLEProfile_ccc_callback(handle, data, size); + } + + return size; +} + +BT_GATTS_NEW_PRIMARY_SERVICE_16(chipOBle_primary_service, CHIPOBLEPROFILE_SERVICE_UUID_16); + +BT_GATTS_NEW_CHARC_128(chipOBle_profile_rx_char, BT_GATT_CHARC_PROP_WRITE, 0x0016, CHIPOBLEPROFILE_CHAR_UUID_RX); +BT_GATTS_NEW_CHARC_VALUE_CALLBACK(chipOBle_profile_rx_value, CHIPOBLEPROFILE_CHAR_SERVER_RX_UUID128, + BT_GATTS_REC_PERM_READABLE | BT_GATTS_REC_PERM_WRITABLE, ble_rx_charc_callback); + +BT_GATTS_NEW_CHARC_128(chipOBle_profile_tx_char, BT_GATT_CHARC_PROP_READ | BT_GATT_CHARC_PROP_INDICATE, 0x0018, + CHIPOBLEPROFILE_CHAR_UUID_TX); + +BT_GATTS_NEW_CHARC_VALUE_CALLBACK(chipOBle_profile_tx_value, CHIPOBLEPROFILE_CHAR_SERVER_TX_UUID128, + BT_GATTS_REC_PERM_READABLE | BT_GATTS_REC_PERM_WRITABLE, ble_tx_charc_value_callback); + +BT_GATTS_NEW_CLIENT_CHARC_CONFIG(chipOBle_profile_tx_config, BT_GATTS_REC_PERM_READABLE | BT_GATTS_REC_PERM_WRITABLE, + ble_tx_ccc_callback); + +static const bt_gatts_service_rec_t * chipOBle_service_rec[] = { + (const bt_gatts_service_rec_t *) &chipOBle_primary_service, (const bt_gatts_service_rec_t *) &chipOBle_profile_rx_char, + (const bt_gatts_service_rec_t *) &chipOBle_profile_rx_value, (const bt_gatts_service_rec_t *) &chipOBle_profile_tx_char, + (const bt_gatts_service_rec_t *) &chipOBle_profile_tx_value, (const bt_gatts_service_rec_t *) &chipOBle_profile_tx_config, +}; + +const bt_gatts_service_t chipOBle_gatts_service = { + .starting_handle = 0x0014, .ending_handle = 0x0019, .required_encryption_key_size = 0, .records = chipOBle_service_rec +}; diff --git a/src/platform/mt793x/BLEManagerImpl.cpp b/src/platform/mt793x/BLEManagerImpl.cpp new file mode 100644 index 00000000000000..bdb16361277e31 --- /dev/null +++ b/src/platform/mt793x/BLEManagerImpl.cpp @@ -0,0 +1,809 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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 of the BLEManager singleton object + * for the MediaTek Genio platforms. + */ + +/* this file behaves like a config.h, comes first */ +#include +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + +#undef BT_ENABLE_HCI_SNOOP_LOG + +#include + +#include "FreeRTOS.h" +#include "event_groups.h" +#include "timers.h" +#include +#include +#include + +#include "bt_callback_manager.h" +#include "bt_gap_le.h" +#include "bt_gatts.h" +#include "bt_init.h" +#include "bt_platform.h" +#include "bt_uuid.h" +#include "connection_info.h" +#ifdef BT_ENABLE_HCI_SNOOP_LOG +#include "bt_driver_btsnoop.h" +#endif +#include "gatt_service.h" + +using namespace ::chip; +using namespace ::chip::Ble; + +extern void (*CHIPoBLEProfile_read_callback)(uint16_t handle, void * data, uint16_t size); +extern void (*CHIPoBLEProfile_write_callback)(uint16_t handle, void * data, uint16_t size); +extern void (*CHIPoBLEProfile_ccc_callback)(uint16_t handle, void * data, uint16_t size); + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +namespace { +#define CHIP_ADV_DATA_TYPE_FLAGS 0x01 +#define CHIP_ADV_DATA_FLAGS 0x06 +#define CHIP_ADV_DATA_TYPE_NAME 0x09 +#define CHIP_ADV_DATA_TYPE_SERVICE_DATA 0x16 +#define CHIP_ADV_SHORT_UUID_LEN 2 + +#define MAX_ADV_DATA_LEN (31) +#define BLE_ADV_OTHER_LEN (9) + +const uint8_t ShortUUID_CHIPoBLEService[] = { 0xF6, 0xFF }; + +#define EG_EVENT_BLE_POWER_ON_CNF (0x01) +#define EG_EVENT_BLE_ADV_CNF (0x02) + +TimerHandle_t sbleAdvTimeoutTimer; // FreeRTOS sw timer. +EventGroupHandle_t xBleEventGroup; + +const ChipBleUUID ChipUUID_CHIPoBLEChar_RX = { { 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F, + 0x9D, 0x11 } }; +const ChipBleUUID ChipUUID_CHIPoBLEChar_TX = { { 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F, + 0x9D, 0x12 } }; + +} // namespace + +BLEManagerImpl BLEManagerImpl::sInstance; + +/***************************************************************************/ +/** + * Setup the bluetooth init function. + * + * @return none + * + * All bluetooth specific initialization + ******************************************************************************/ + +CHIP_ERROR BLEManagerImpl::_Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + // Initialize the CHIP BleLayer. + ChipLogError(DeviceLayer, "BLE init start"); + err = BleLayer::Init(this, this, &DeviceLayer::SystemLayer()); + ChipLogError(DeviceLayer, "BleLayer init complete"); + SuccessOrExit(err); + + mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Enabled; + CHIPoBLEProfile_write_callback = BLEManagerImpl::HandleRXCharWrite; + CHIPoBLEProfile_ccc_callback = BLEManagerImpl::HandleTXCharCCCDWrite; + + xBleEventGroup = xEventGroupCreate(); + if (xBleEventGroup == NULL) + { + ChipLogError(DeviceLayer, "Cannot create xBleEventGroup"); + err = CHIP_ERROR_NO_MEMORY; + } + SuccessOrExit(err); + + init_connection_info(); + bt_create_task(); + + bt_callback_manager_register_callback(bt_callback_type_app_event, + (uint32_t)(MODULE_MASK_GAP | MODULE_MASK_GATT | MODULE_MASK_SYSTEM), + (void *) BleMatterAppEventCallback); +#ifdef BT_ENABLE_HCI_SNOOP_LOG + bt_driver_btsnoop_ctrl(1); +#endif + // Create FreeRTOS sw timer for BLE timeouts and interval change. + sbleAdvTimeoutTimer = xTimerCreate("BleAdvTimer", // Just a text name, not used by the RTOS kernel + 1, // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = ble obj context + BleAdvTimeoutHandler // timer callback handler + ); + + mFlags.ClearAll().Set(Flags::kAdvertisingEnabled, CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART); + mFlags.Set(Flags::kFastAdvertisingEnabled, true); + PlatformMgr().ScheduleWork(DriveBLEState, 0); + +exit: + return err; +} + +uint16_t BLEManagerImpl::_NumConnections(void) +{ + return num_connection_info(); +} + +#if 0 +CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); + + if (val != mServiceMode) + { + mServiceMode = val; + PlatformMgr().ScheduleWork(DriveBLEState, 0); + } + +exit: + return err; +} +#endif + +CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); + + if (mFlags.Has(Flags::kAdvertisingEnabled) != val) + { + mFlags.Set(Flags::kAdvertisingEnabled, val); + PlatformMgr().ScheduleWork(DriveBLEState, 0); + } + +exit: + return err; +} + +CHIP_ERROR BLEManagerImpl::_SetAdvertisingMode(BLEAdvertisingMode mode) +{ + switch (mode) + { + case BLEAdvertisingMode::kFastAdvertising: + mFlags.Set(Flags::kFastAdvertisingEnabled, true); + break; + case BLEAdvertisingMode::kSlowAdvertising: + mFlags.Set(Flags::kFastAdvertisingEnabled, false); + break; + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } + + mFlags.Set(Flags::kRestartAdvertising); + PlatformMgr().ScheduleWork(DriveBLEState, 0); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR BLEManagerImpl::_GetDeviceName(char * buf, size_t bufSize) +{ + if (strlen(gatts_device_name) >= bufSize) + { + return CHIP_ERROR_BUFFER_TOO_SMALL; + } + + strcpy(buf, gatts_device_name); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR BLEManagerImpl::_SetDeviceName(const char * deviceName) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + if (mServiceMode == ConnectivityManager::kCHIPoBLEServiceMode_NotSupported) + { + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; + } + + if (deviceName != NULL && deviceName[0] != 0) + { + if (strlen(deviceName) >= kMaxDeviceNameLength) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + strcpy(gatts_device_name, deviceName); + } + else + { + gatts_device_name[0] = 0; + } + + return CHIP_NO_ERROR; +} + +void BLEManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) +{ + switch (event->Type) + { + case DeviceEventType::kCHIPoBLESubscribe: { + ChipDeviceEvent connEstEvent; + + ChipLogProgress(DeviceLayer, "_OnBlePlatformEvent kCHIPoBLESubscribe"); + HandleSubscribeReceived(event->CHIPoBLESubscribe.ConId, &CHIP_BLE_SVC_ID, &ChipUUID_CHIPoBLEChar_TX); + connEstEvent.Type = DeviceEventType::kCHIPoBLEConnectionEstablished; + PlatformMgr().PostEventOrDie(&connEstEvent); + } + break; + + case DeviceEventType::kCHIPoBLEUnsubscribe: { + ChipLogProgress(DeviceLayer, "_OnBlePlatformEvent kCHIPoBLEUnsubscribe"); + HandleUnsubscribeReceived(event->CHIPoBLEUnsubscribe.ConId, &CHIP_BLE_SVC_ID, &ChipUUID_CHIPoBLEChar_TX); + } + break; + + case DeviceEventType::kCHIPoBLEWriteReceived: { + ChipLogProgress(DeviceLayer, "_OnBlePlatformEvent kCHIPoBLEWriteReceived"); + HandleWriteReceived(event->CHIPoBLEWriteReceived.ConId, &CHIP_BLE_SVC_ID, &ChipUUID_CHIPoBLEChar_RX, + PacketBufferHandle::Adopt(event->CHIPoBLEWriteReceived.Data)); + } + break; + + case DeviceEventType::kCHIPoBLEConnectionError: { + ChipLogProgress(DeviceLayer, "_OnBlePlatformEvent kCHIPoBLEConnectionError"); + HandleConnectionError(event->CHIPoBLEConnectionError.ConId, event->CHIPoBLEConnectionError.Reason); + } + break; + + case DeviceEventType::kCHIPoBLEIndicateConfirm: { + ChipLogProgress(DeviceLayer, "_OnBlePlatformEvent kCHIPoBLEIndicateConfirm, ConId %04x", + event->CHIPoBLEIndicateConfirm.ConId); + HandleIndicationConfirmation(event->CHIPoBLEIndicateConfirm.ConId, &CHIP_BLE_SVC_ID, &ChipUUID_CHIPoBLEChar_TX); + } + break; + + case DeviceEventType::kCHIPoBLENotifyConfirm: { + ChipLogProgress(DeviceLayer, "_OnBlePlatformEvent kCHIPoBLENotifyConfirm"); + HandleTxConfirmationEvent(event->CHIPoBLENotifyConfirm.ConId); + } + break; + + default: + ChipLogProgress(DeviceLayer, "_OnBlePlatformEvent default: event->Type = %d", event->Type); + break; + } +} + +bool BLEManagerImpl::SubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId) +{ + ChipLogProgress(DeviceLayer, "BLEManagerImpl::SubscribeCharacteristic() not supported"); + return false; +} + +bool BLEManagerImpl::UnsubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId) +{ + ChipLogProgress(DeviceLayer, "BLEManagerImpl::UnsubscribeCharacteristic() not supported"); + return false; +} + +bool BLEManagerImpl::CloseConnection(BLE_CONNECTION_OBJECT conId) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + bt_hci_cmd_disconnect_t disconnect_para; + bt_status_t ret; + + ChipLogProgress(DeviceLayer, "Closing BLE GATT connection (con %u)", conId); + + disconnect_para.connection_handle = conId; + disconnect_para.reason = BT_HCI_STATUS_REMOTE_USER_TERMINATED_CONNECTION; + + ret = bt_gap_le_disconnect(&disconnect_para); + err = MapBLEError(ret); + + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "bt_gap_le_disconnect() failed: %s", ErrorStr(err)); + } + + return (err == CHIP_NO_ERROR); +} + +uint16_t BLEManagerImpl::GetMTU(BLE_CONNECTION_OBJECT conId) const +{ + ChipLogProgress(DeviceLayer, "GetMTU (con %u), returning 247", conId); + return 247; +} + +#define INDICATION_BUFFER_LENGTH (300) +bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, + PacketBufferHandle data) +{ + uint8_t buf[INDICATION_BUFFER_LENGTH + 3] = { 0 }; + bt_gattc_charc_value_notification_indication_t * req; + CHIP_ERROR err = CHIP_NO_ERROR; + ChipDeviceEvent event; + bt_status_t ret; + + VerifyOrExit(UUIDsMatch(&ChipUUID_CHIPoBLEChar_TX, charId), err = CHIP_ERROR_INVALID_MESSAGE_TYPE); + VerifyOrExit(UUIDsMatch(&ChipUUID_CHIPoBLEChar_TX, charId), err = CHIP_ERROR_INVALID_MESSAGE_TYPE); + + ChipLogProgress(DeviceLayer, "SendIndication(): conId %d, len %d", conId, data->DataLength()); + + if (data->DataLength() > INDICATION_BUFFER_LENGTH) + { + ChipLogError(DeviceLayer, "SendIndication(): Exceed buffer length! conId %d, len %d", conId, data->DataLength()); + err = CHIP_ERROR_NO_MEMORY; + goto exit; + } + + req = (bt_gattc_charc_value_notification_indication_t *) buf; + req->attribute_value_length = 3 + data->DataLength(); + req->att_req.opcode = BT_ATT_OPCODE_HANDLE_VALUE_INDICATION; + req->att_req.handle = 24; + memcpy(&req->att_req.attribute_value[0], data->Start(), data->DataLength()); + ret = bt_gatts_send_charc_value_notification_indication(conId, req); + err = MapBLEError(ret); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "BLEManagerImpl::SendIndication() failed: %s", ErrorStr(err)); + return false; + } + + return true; +} + +void BLEManagerImpl::HandleRXCharWrite(uint16_t handle, void * data, uint16_t size) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + System::PacketBufferHandle buf; + uint16_t writeLen = size; + + // Copy the data to a packet buffer. + buf = System::PacketBufferHandle::NewWithData(data, writeLen, 0, 0); + VerifyOrExit(!buf.IsNull(), err = CHIP_ERROR_NO_MEMORY); + + ChipLogDetail(DeviceLayer, "Write request/command received for CHIPoBLE RX characteristic (con %u, len %u)", handle, + buf->DataLength()); + + // Post an event to the CHIP queue to deliver the data into the CHIP stack. + { + ChipDeviceEvent event; + event.Type = DeviceEventType::kCHIPoBLEWriteReceived; + event.CHIPoBLEWriteReceived.ConId = handle; + event.CHIPoBLEWriteReceived.Data = std::move(buf).UnsafeRelease(); + err = PlatformMgr().PostEvent(&event); + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "HandleRXCharWrite() failed: %s", ErrorStr(err)); + } +} + +void BLEManagerImpl::HandleTXCharCCCDWrite(uint16_t handle, void * data, uint16_t size) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + app_bt_connection_cb_t * bleConnState; + bool isDisabled; + ChipDeviceEvent event; + bleConnState = find_connection_info_by_handle(handle); + VerifyOrExit(bleConnState != NULL, err = CHIP_ERROR_NO_MEMORY); + + VerifyOrExit(size == sizeof(uint16_t), err = CHIP_ERROR_INVALID_MESSAGE_LENGTH); + + // Determine if the client is enabling or disabling notification/indication. + isDisabled = (*(uint16_t *) data != 0x0002); + + ChipLogProgress(DeviceLayer, "HandleTXcharCCCDWrite - Config Flags value : %d", *(uint16_t *) data); + ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", isDisabled ? "unsubscribe" : "subscribe"); + + if (!isDisabled) + { + // If indications are not already enabled for the connection... + if (!bleConnState->subscribed) + { + bleConnState->subscribed = 1; + // Post an event to the CHIP queue to process either a CHIPoBLE Subscribe or Unsubscribe based on + // whether the client is enabling or disabling indications. + { + event.Type = DeviceEventType::kCHIPoBLESubscribe; + event.CHIPoBLESubscribe.ConId = handle; + err = PlatformMgr().PostEvent(&event); + } + } + } + else + { + bleConnState->subscribed = 0; + event.Type = DeviceEventType::kCHIPoBLEUnsubscribe; + event.CHIPoBLESubscribe.ConId = handle; + err = PlatformMgr().PostEvent(&event); + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "HandleTXCharCCCDWrite() failed: %s", ErrorStr(err)); + } +} + +bool BLEManagerImpl::SendWriteRequest(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, + PacketBufferHandle pBuf) +{ + ChipLogProgress(DeviceLayer, "BLEManagerImpl::SendWriteRequest() not supported"); + return false; +} + +bool BLEManagerImpl::SendReadRequest(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, + PacketBufferHandle pBuf) +{ + ChipLogProgress(DeviceLayer, "BLEManagerImpl::SendReadRequest() not supported"); + return false; +} + +bool BLEManagerImpl::SendReadResponse(BLE_CONNECTION_OBJECT conId, BLE_READ_REQUEST_CONTEXT requestContext, + const ChipBleUUID * svcId, const ChipBleUUID * charId) +{ + ChipLogProgress(DeviceLayer, "BLEManagerImpl::SendReadResponse() not supported"); + return false; +} + +void BLEManagerImpl::NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) +{ + // Nothing to do +} + +void BLEManagerImpl::HandleTxConfirmationEvent(BLE_CONNECTION_OBJECT conId) +{ + ChipDeviceEvent event; + ChipLogProgress(DeviceLayer, "Tx Confirmation received!!!"); + + event.Type = DeviceEventType::kCHIPoBLEIndicateConfirm; + event.CHIPoBLEIndicateConfirm.ConId = conId; + PlatformMgr().PostEventOrDie(&event); +} + +CHIP_ERROR BLEManagerImpl::MapBLEError(int bleErr) +{ + switch (bleErr) + { + case BT_STATUS_SUCCESS: + return CHIP_NO_ERROR; + default: + return CHIP_ERROR(ChipError::Range::kPlatform, bleErr + CHIP_DEVICE_CONFIG_BLE_ERROR_MIN); + } +} + +CHIP_ERROR BLEManagerImpl::StartAdvertising(void) +{ + bt_hci_cmd_le_set_advertising_enable_t enable; + uint32_t deviceNameLength = 0; + ChipBLEDeviceIdentificationInfo deviceIdInfo; + uint8_t deviceIdInfoLength = sizeof(deviceIdInfo); + CHIP_ERROR err = CHIP_NO_ERROR; + int adv_name_len; + uint32_t index = 0; + bt_status_t ret; + + bt_hci_cmd_le_set_advertising_parameters_t adv_param = { .advertising_interval_min = + CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN, + .advertising_interval_max = + CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX, + .advertising_type = BT_HCI_ADV_TYPE_CONNECTABLE_UNDIRECTED, + .own_address_type = BT_ADDR_PUBLIC, + .advertising_channel_map = 7, + .advertising_filter_policy = 0 }; + + bt_hci_cmd_le_set_advertising_data_t adv_data = { + .advertising_data_length = MAX_ADV_DATA_LEN, + }; + + if (mFlags.Has(Flags::kRestartAdvertising)) + { + ChipLogProgress(DeviceLayer, "Stop advertising.."); + enable.advertising_enable = BT_HCI_DISABLE; + ret = bt_gap_le_set_advertising(&enable, NULL, NULL, NULL); + + if (BT_STATUS_SUCCESS == ret) + { + xEventGroupWaitBits(xBleEventGroup, EG_EVENT_BLE_ADV_CNF, pdTRUE, pdFALSE, pdMS_TO_TICKS(10000)); + ChipLogProgress(DeviceLayer, "Advertising stopped."); + } + + mFlags.Clear(Flags::kRestartAdvertising); + } + + if (mFlags.Has(Flags::kFastAdvertisingEnabled)) + { + adv_param.advertising_interval_min = CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN; + adv_param.advertising_interval_max = CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX; + } + + if (!mFlags.Has(Flags::kDeviceNameSet)) + { + snprintf(gatts_device_name, sizeof(gatts_device_name), "%s%04" PRIX32, CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX, + (uint32_t) 0); + + gatts_device_name[kMaxDeviceNameLength] = 0; + } + + deviceNameLength = strlen(gatts_device_name); + + VerifyOrExit(deviceNameLength < kMaxDeviceNameLength, err = CHIP_ERROR_INVALID_ARGUMENT); + deviceNameLength = + deviceNameLength > MAX_ADV_DATA_LEN - BLE_ADV_OTHER_LEN - 1 ? MAX_ADV_DATA_LEN - BLE_ADV_OTHER_LEN - 1 : deviceNameLength; + + ChipLogProgress(DeviceLayer, "Beginning advertising, interval(min,max)=(%d, %d), devName=%s, len=%lu", + adv_param.advertising_interval_min, adv_param.advertising_interval_max, gatts_device_name, deviceNameLength); + + err = ConfigurationMgr().GetBLEDeviceIdentificationInfo(deviceIdInfo); + SuccessOrExit(err); + + static_assert(sizeof(deviceIdInfo) + CHIP_ADV_SHORT_UUID_LEN + 1 <= UINT8_MAX, "Our length won't fit in a uint8_t"); + static_assert(2 + CHIP_ADV_SHORT_UUID_LEN + sizeof(deviceIdInfo) + 1 <= MAX_ADV_DATA_LEN, "Our buffer is not big enough"); + + adv_data.advertising_data[index++] = 0x02; // AD length + adv_data.advertising_data[index++] = CHIP_ADV_DATA_TYPE_FLAGS; // AD type : flags + adv_data.advertising_data[index++] = CHIP_ADV_DATA_FLAGS; // AD value + + adv_data.advertising_data[index++] = static_cast(deviceIdInfoLength + CHIP_ADV_SHORT_UUID_LEN + 1); // AD length + adv_data.advertising_data[index++] = CHIP_ADV_DATA_TYPE_SERVICE_DATA; // AD type : Service Data + adv_data.advertising_data[index++] = ShortUUID_CHIPoBLEService[0]; // AD value + adv_data.advertising_data[index++] = ShortUUID_CHIPoBLEService[1]; + + memcpy(&adv_data.advertising_data[index], (void *) &deviceIdInfo, deviceIdInfoLength); // AD value + index += deviceIdInfoLength; + + adv_data.advertising_data[index++] = static_cast(deviceNameLength + 1); // AD length + adv_data.advertising_data[index++] = CHIP_ADV_DATA_TYPE_NAME; // AD type : name + memcpy(&adv_data.advertising_data[index], gatts_device_name, deviceNameLength); // AD value + index += deviceNameLength; + + enable.advertising_enable = BT_HCI_ENABLE; + ret = bt_gap_le_set_advertising(&enable, &adv_param, &adv_data, NULL); + + err = MapBLEError(ret); + SuccessOrExit(err); + + if ((xEventGroupWaitBits(xBleEventGroup, EG_EVENT_BLE_ADV_CNF, pdTRUE, pdFALSE, pdMS_TO_TICKS(10000)) & EG_EVENT_BLE_ADV_CNF) == + EG_EVENT_BLE_ADV_CNF) + { + ChipLogProgress(DeviceLayer, "Advertising started."); + if (mFlags.Has(Flags::kFastAdvertisingEnabled)) + { + StartBleAdvTimeoutTimer(CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME); + } + mFlags.Set(Flags::kAdvertising); + } + else + { + err = CHIP_ERROR_TIMEOUT; + } + +exit: + return err; +} + +CHIP_ERROR BLEManagerImpl::StopAdvertising(void) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + bt_status_t ret; + + if (mFlags.Has(Flags::kAdvertising)) + { + mFlags.Clear(Flags::kAdvertising).Clear(Flags::kRestartAdvertising); + mFlags.Set(Flags::kFastAdvertisingEnabled, true); + + ChipLogProgress(DeviceLayer, "Stop advertising.."); + bt_hci_cmd_le_set_advertising_enable_t enable = { BT_HCI_DISABLE }; + ret = bt_gap_le_set_advertising(&enable, NULL, NULL, NULL); + + err = MapBLEError(ret); + SuccessOrExit(err); + + if ((xEventGroupWaitBits(xBleEventGroup, EG_EVENT_BLE_ADV_CNF, pdTRUE, pdFALSE, pdMS_TO_TICKS(10000)) & + EG_EVENT_BLE_ADV_CNF) != EG_EVENT_BLE_ADV_CNF) + { + err = CHIP_ERROR_TIMEOUT; + } + SuccessOrExit(err); + + ChipLogProgress(DeviceLayer, "Advertising stopped."); + + CancelBleAdvTimeoutTimer(); + } + +exit: + return err; +} + +void BLEManagerImpl::BleAdvTimeoutHandler(TimerHandle_t xTimer) +{ + if (BLEMgrImpl().mFlags.Has(Flags::kFastAdvertisingEnabled)) + { + ChipLogDetail(DeviceLayer, "bleAdv Timeout : Start slow advertisement"); + BLEMgr().SetAdvertisingMode(BLEAdvertisingMode::kSlowAdvertising); + } + else if (BLEMgrImpl().mFlags.Has(Flags::kAdvertising)) + { + // Advertisement time expired. Stop advertising + ChipLogDetail(DeviceLayer, "bleAdv Timeout : Stop advertissement"); + BLEMgr().SetAdvertisingEnabled(false); + } +} + +void BLEManagerImpl::CancelBleAdvTimeoutTimer(void) +{ + if (xTimerStop(sbleAdvTimeoutTimer, 0) == pdFAIL) + { + ChipLogError(DeviceLayer, "Failed to stop BledAdv timeout timer"); + } +} + +void BLEManagerImpl::StartBleAdvTimeoutTimer(uint32_t aTimeoutInMs) +{ + if (xTimerIsTimerActive(sbleAdvTimeoutTimer)) + { + CancelBleAdvTimeoutTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ticks if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sbleAdvTimeoutTimer, aTimeoutInMs / portTICK_PERIOD_MS, 100) != pdPASS) + { + ChipLogError(DeviceLayer, "Failed to start BledAdv timeout timer"); + } +} + +bt_status_t BLEManagerImpl::BleMatterAppEventCallback(bt_msg_type_t msg, bt_status_t status, void * buff) +{ + ChipLogProgress(DeviceLayer, "BleMatterAppEventCallback: msg %08x, status %08x", (unsigned int) msg, (unsigned int) status); + + // PlatformMgr().LockChipStack(); + + switch (msg) + { + case BT_POWER_ON_CNF: + if (BT_STATUS_SUCCESS != bt_gatts_set_max_mtu(247)) + { + ChipLogError(DeviceLayer, "Unable to set BT GATTS maximum mtu size!"); + } + + sInstance.mFlags.Set(Flags::kBLEStackInitialized); + PlatformMgr().ScheduleWork(DriveBLEState, 0); + break; + + case BT_GAP_LE_SET_ADVERTISING_CNF: + ChipLogProgress(DeviceLayer, "BT_GAP_LE_SET_ADVERTISING_CNF: Raise EG_EVENT_BLE_ADV_CNF"); + xEventGroupSetBits(xBleEventGroup, EG_EVENT_BLE_ADV_CNF); + break; + + case BT_GAP_LE_CONNECT_IND: + PlatformMgr().ScheduleWork(DriveBLEState, 0); + break; + + case BT_GAP_LE_DISCONNECT_IND: { + bt_hci_evt_disconnect_complete_t * conn_evt = (bt_hci_evt_disconnect_complete_t *) buff; + ChipDeviceEvent event; + event.Type = DeviceEventType::kCHIPoBLEConnectionError; + event.CHIPoBLEConnectionError.ConId = conn_evt->connection_handle; + + switch (conn_evt->reason) + { + case BT_HCI_STATUS_REMOTE_USER_TERMINATED_CONNECTION: + case BT_HCI_STATUS_REMOTE_TERMINATED_CONNECTION_DUE_TO_LOW_RESOURCES: + case BT_HCI_STATUS_REMOTE_TERMINATED_CONNECTION_DUE_TO_POWER_OFF: + event.CHIPoBLEConnectionError.Reason = BLE_ERROR_REMOTE_DEVICE_DISCONNECTED; + break; + + case BT_HCI_STATUS_CONNECTION_TERMINATED_BY_LOCAL_HOST: + event.CHIPoBLEConnectionError.Reason = BLE_ERROR_APP_CLOSED_CONNECTION; + break; + + default: + event.CHIPoBLEConnectionError.Reason = BLE_ERROR_CHIPOBLE_PROTOCOL_ABORT; + break; + } + + ChipLogProgress(DeviceLayer, "BLE GATT connection closed (con %u, reason %u)", conn_evt->connection_handle, + conn_evt->reason); + + PlatformMgr().PostEventOrDie(&event); + + // Arrange to re-enable connectable advertising in case it was disabled due to the + // maximum connection limit being reached. + + sInstance.mFlags.Set(Flags::kRestartAdvertising); + sInstance.mFlags.Set(Flags::kFastAdvertisingEnabled); + PlatformMgr().ScheduleWork(DriveBLEState, 0); + } + break; + case BT_GATTC_CHARC_VALUE_CONFIRMATION: { + bt_handle_t * connection_handle_p = (bt_handle_t *) buff; + ChipDeviceEvent event; + + ChipLogProgress(DeviceLayer, "Tx Confirmation received"); + + event.Type = DeviceEventType::kCHIPoBLEIndicateConfirm; + event.CHIPoBLEIndicateConfirm.ConId = *connection_handle_p; + PlatformMgr().PostEventOrDie(&event); + } + break; + + default: + break; + } + + // PlatformMgr().UnlockChipStack(); + + return BT_STATUS_SUCCESS; +} + +void BLEManagerImpl::DriveBLEState(void) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + // Check if BLE stack is initialized + VerifyOrExit(mFlags.Has(Flags::kBLEStackInitialized), /* */); + + // Start advertising if needed... + if (mServiceMode == ConnectivityManager::kCHIPoBLEServiceMode_Enabled && mFlags.Has(Flags::kAdvertisingEnabled) && + NumConnections() < kMaxConnections) + { + // Start/re-start advertising if not already started, or if there is a pending change + // to the advertising configuration. + if (!mFlags.Has(Flags::kAdvertising) || mFlags.Has(Flags::kRestartAdvertising)) + { + err = StartAdvertising(); + SuccessOrExit(err); + } + } + + // Otherwise, stop advertising if it is enabled. + else if (mFlags.Has(Flags::kAdvertising)) + { + err = StopAdvertising(); + SuccessOrExit(err); + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Disabling CHIPoBLE service due to error: %s", ErrorStr(err)); + mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Disabled; + } +} + +void BLEManagerImpl::DriveBLEState(intptr_t arg) +{ + sInstance.DriveBLEState(); +} + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip + +#endif // CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE diff --git a/src/platform/mt793x/BLEManagerImpl.h b/src/platform/mt793x/BLEManagerImpl.h new file mode 100644 index 00000000000000..ad83ef20ea81ad --- /dev/null +++ b/src/platform/mt793x/BLEManagerImpl.h @@ -0,0 +1,169 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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 of the BLEManager singleton object + * for the MediaTek MT793x platforms. + */ + +#pragma once + +#include + +typedef void (*CHIPoBLECharCallback)(uint16_t, void *, uint16_t); + +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + +#include "FreeRTOS.h" +#include "bt_type.h" +#include "timers.h" + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +using namespace chip::Ble; + +/** + * Concrete implementation of the BLEManager singleton object for the Genio platforms. + */ +class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePlatformDelegate, private BleApplicationDelegate +{ + // Allow the BLEManager interface class to delegate method calls to + // the implementation methods provided by this class. + friend BLEManager; + + // ===== Members that implement the BLEManager internal interface. + CHIP_ERROR _Init(void); + CHIP_ERROR _Shutdown() { return CHIP_NO_ERROR; } + bool _IsAdvertisingEnabled(void); + CHIP_ERROR _SetAdvertisingEnabled(bool val); + bool _IsAdvertising(void); + CHIP_ERROR _SetAdvertisingMode(BLEAdvertisingMode mode); + CHIP_ERROR _GetDeviceName(char * buf, size_t bufSize); + CHIP_ERROR _SetDeviceName(const char * deviceName); + uint16_t _NumConnections(void); + void _OnPlatformEvent(const ChipDeviceEvent * event); + BleLayer * _GetBleLayer(void); + + // ===== Members that implement virtual methods on BlePlatformDelegate. + + bool SubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, + const Ble::ChipBleUUID * charId) override; + bool UnsubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, + const Ble::ChipBleUUID * charId) override; + bool CloseConnection(BLE_CONNECTION_OBJECT conId) override; + uint16_t GetMTU(BLE_CONNECTION_OBJECT conId) const override; + bool SendIndication(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, const Ble::ChipBleUUID * charId, + System::PacketBufferHandle pBuf) override; + bool SendWriteRequest(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, const Ble::ChipBleUUID * charId, + System::PacketBufferHandle pBuf) override; + bool SendReadRequest(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, const Ble::ChipBleUUID * charId, + System::PacketBufferHandle pBuf) override; + bool SendReadResponse(BLE_CONNECTION_OBJECT conId, BLE_READ_REQUEST_CONTEXT requestContext, const Ble::ChipBleUUID * svcId, + const Ble::ChipBleUUID * charId) override; + + // ===== Members that implement virtual methods on BleApplicationDelegate. + + void NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) override; + + // ===== Members for internal use by the following friends. + + friend BLEManager & BLEMgr(void); + friend BLEManagerImpl & BLEMgrImpl(void); + + static BLEManagerImpl sInstance; + + // ===== Private members reserved for use by this class only. + enum class Flags : uint16_t + { + kAdvertisingEnabled = 0x0001, + kFastAdvertisingEnabled = 0x0002, + kAdvertising = 0x0004, + kRestartAdvertising = 0x0008, + kBLEStackInitialized = 0x0010, + kDeviceNameSet = 0x0020, + }; + + enum + { + kMaxConnections = BLE_LAYER_NUM_BLE_ENDPOINTS, + kMaxDeviceNameLength = 16, + kUnusedIndex = 0xFFFF, + }; + + CHIPoBLEServiceMode mServiceMode; + BitFlags mFlags; + + CHIP_ERROR MapBLEError(int bleErr); + void DriveBLEState(void); + CHIP_ERROR StartAdvertising(void); + CHIP_ERROR StopAdvertising(void); + void StartBleAdvTimeoutTimer(uint32_t aTimeoutInMs); + void CancelBleAdvTimeoutTimer(void); + void HandleTxConfirmationEvent(BLE_CONNECTION_OBJECT conId); + static void DriveBLEState(intptr_t arg); + static void BleAdvTimeoutHandler(TimerHandle_t xTimer); + static bt_status_t BleMatterAppEventCallback(bt_msg_type_t msg, bt_status_t status, void * buff); + static void HandleRXCharWrite(uint16_t handle, void * data, uint16_t size); + static void HandleTXCharCCCDWrite(uint16_t handle, void * data, uint16_t size); +}; + +/** + * Returns a reference to the public interface of the BLEManager singleton object. + * + * Internal components should use this to access features of the BLEManager object + * that are common to all platforms. + */ +inline BLEManager & BLEMgr(void) +{ + return BLEManagerImpl::sInstance; +} + +/** + * Returns the platform-specific implementation of the BLEManager singleton object. + * + * Internal components can use this to gain access to features of the BLEManager + * that are specific to the Genio platforms. + */ +inline BLEManagerImpl & BLEMgrImpl(void) +{ + return BLEManagerImpl::sInstance; +} + +inline BleLayer * BLEManagerImpl::_GetBleLayer() +{ + return this; +} + +// inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode(void) +//{ +// return mServiceMode; +//} + +inline bool BLEManagerImpl::_IsAdvertisingEnabled(void) +{ + return mFlags.Has(Flags::kAdvertisingEnabled); +} + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip + +#endif // CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE diff --git a/src/platform/mt793x/BUILD.gn b/src/platform/mt793x/BUILD.gn new file mode 100644 index 00000000000000..0715833c6c4cd6 --- /dev/null +++ b/src/platform/mt793x/BUILD.gn @@ -0,0 +1,88 @@ +# 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/pigweed.gni") + +import("${chip_root}/src/platform/device.gni") + +assert(chip_device_platform == "mt793x") + +static_library("mt793x") { + sources = [ + "../SingletonConfigurationManager.cpp", + "BLEGattProfile.c", + "BLEManagerImpl.cpp", + "BLEManagerImpl.h", + "BlePlatformConfig.h", + "CHIPDevicePlatformConfig.h", + "CHIPDevicePlatformEvent.h", + "CHIPMem-Platform.cpp", + "CHIPPlatformConfig.h", + "ConfigurationManagerImpl.cpp", + "ConfigurationManagerImpl.h", + "ConnectivityManagerImpl.cpp", + "ConnectivityManagerImpl.h", + "DeviceNetworkProvisioningDelegateImpl.cpp", + "DeviceNetworkProvisioningDelegateImpl.h", + "DiagnosticDataProviderImpl.cpp", + "DiagnosticDataProviderImpl.h", + "DnssdImpl.cpp", + "KeyValueStoreManagerImpl.cpp", + "KeyValueStoreManagerImpl.h", + "Logging.cpp", + "MT793XConfig.cpp", + "MT793XConfig.h", + "MtkWiFiEvents.cpp", + "PlatformManagerImpl.cpp", + "PlatformManagerImpl.h", + "SystemPlatformConfig.h", + "SystemTimeSupport.cpp", + ] + + if (chip_enable_ota_requestor) { + sources += [ + "OTAImageProcessorImpl.cpp", + "OTAImageProcessorImpl.h", + ] + } + + # "${chip_root}/src/app:app_config", + public_deps = [ "${chip_root}/src/platform:platform_base" ] + + public_deps += [ "${chip_root}/third_party/mt793x_sdk/mDNSResponder" ] + + # Add pigweed KVS + deps = [ + "$dir_pw_kvs:crc16", + "$dir_pw_log", + ] + public_deps += [ + "$dir_pw_checksum", + "$dir_pw_kvs", + ] + + # mDNS + if (chip_mdns == "platform") { + deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] + } + + if (chip_enable_wifi) { + sources += [ + "ConnectivityManagerImpl_WIFI.cpp", + "NetworkCommissioningWiFiDriver.cpp", + "NetworkCommissioningWiFiDriver.h", + ] + } +} diff --git a/src/platform/mt793x/BlePlatformConfig.h b/src/platform/mt793x/BlePlatformConfig.h new file mode 100644 index 00000000000000..950b49dd56c68a --- /dev/null +++ b/src/platform/mt793x/BlePlatformConfig.h @@ -0,0 +1,39 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * + * 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 + * Platform-specific configuration overrides for the CHIP BLE + * Layer on Genio platforms using the MediaTek SDK. + * + */ + +#pragma once + +// ==================== Platform Adaptations ==================== + +#define BLE_CONNECTION_OBJECT uint16_t +#define BLE_CONNECTION_UNINITIALIZED ((uint16_t) -1) +#define BLE_MAX_RECEIVE_WINDOW_SIZE 5 + +#define BLE_CONFIG_ERROR_MIN 6000000 +#define BLE_CONFIG_ERROR_MAX 6000999 + +// ========== Platform-specific Configuration Overrides ========= + +/* none so far */ diff --git a/src/platform/mt793x/CHIPDevicePlatformConfig.h b/src/platform/mt793x/CHIPDevicePlatformConfig.h new file mode 100644 index 00000000000000..4539dc7e774ce4 --- /dev/null +++ b/src/platform/mt793x/CHIPDevicePlatformConfig.h @@ -0,0 +1,97 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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 + * Platform-specific configuration overrides for the Chip Device Layer + * on Genio platforms using the MediaTek SDK. + */ + +#pragma once + +// ==================== Platform Adaptations ==================== + +#define CHIP_DEVICE_CONFIG_BLE_ERROR_MIN 0xC00000 + +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 1 + +#if defined(SL_WIFI) +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 +#elif CHIP_ENABLE_OPENTHREAD + +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD 1 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 1 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_DNS_CLIENT 1 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_COMMISSIONABLE_DISCOVERY 1 +#define CHIP_DEVICE_CONFIG_ENABLE_DNSSD 1 +#endif /* CHIP_ENABLE_OPENTHREAD */ + +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DISCOVERY 1 + +#ifndef CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 +#endif + +#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 +#define CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_GLOBAL_EIDC_KEY 2 + +// ========== Platform-specific Configuration ========= + +// These are configuration options that are unique to the Genio platform. +// These can be overridden by the application as needed. + +// ========== Platform-specific Configuration Overrides ========= + +#ifndef CHIP_DEVICE_CONFIG_BLE_LL_TASK_PRIORITY +#define CHIP_DEVICE_CONFIG_BLE_LL_TASK_PRIORITY (configTIMER_TASK_PRIORITY - 1) +#endif // CHIP_DEVICE_CONFIG_BLE_LL_TASK_PRIORITY + +#ifndef CHIP_DEVICE_CONFIG_BLE_STACK_TASK_PRIORITY +#define CHIP_DEVICE_CONFIG_BLE_STACK_TASK_PRIORITY (CHIP_DEVICE_CONFIG_BLE_LL_TASK_PRIORITY - 1) +#endif // CHIP_DEVICE_CONFIG_BLE_STACK_TASK_PRIORITY + +#ifndef CHIP_DEVICE_CONFIG_BLE_APP_TASK_PRIORITY +#define CHIP_DEVICE_CONFIG_BLE_APP_TASK_PRIORITY (CHIP_DEVICE_CONFIG_BLE_STACK_TASK_PRIORITY - 1) +#endif // CHIP_DEVICE_CONFIG_BLE_STACK_TASK_PRIORITY + +#ifndef CHIP_DEVICE_CONFIG_BLE_APP_TASK_STACK_SIZE +#define CHIP_DEVICE_CONFIG_BLE_APP_TASK_STACK_SIZE 1536 +#endif // CHIP_DEVICE_CONFIG_BLE_APP_TASK_STACK_SIZE + +#ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE +#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE (6 * 1024) +#endif // CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE + +#ifndef CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE +#define CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE (4 * 1024) +#endif // CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE + +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY 0 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY 0 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY_FULL 0 + +#ifndef CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME +#define CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME "BLE_EVENT" +#endif // CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME +#define CHIP_DEVICE_CONFIG_LOG_PROVISIONING_HASH 0 + +#define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 25 + +#define CHIP_DEVICE_CONFIG_WIFI_AP_CHANNEL 44 diff --git a/src/platform/mt793x/CHIPDevicePlatformEvent.h b/src/platform/mt793x/CHIPDevicePlatformEvent.h new file mode 100644 index 00000000000000..962f7867d21d6d --- /dev/null +++ b/src/platform/mt793x/CHIPDevicePlatformEvent.h @@ -0,0 +1,93 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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 + * Defines platform-specific event types and data for the Chip + * Device Layer on MT793x platforms using MT793x SDK. + */ + +#pragma once + +#include +#include + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +#include "wifi_api_ex.h" +#endif +#include "filogic.h" + +#define MTK_EVENT_BUF_LEN 40 + +namespace chip { +namespace DeviceLayer { + +namespace DeviceEventType { + +/** + * Enumerates MT793x platform-specific event types that are visible to the + * application. + */ +enum PublicPlatformSpecificEventTypes +{ + /* None currently defined */ +}; + +/** + * Enumerates MT793x platform-specific event types that are internal to the + * Chip Device Layer. + */ +enum InternalPlatformSpecificEventTypes +{ + kMtkFilogicEvent = kRange_InternalPlatformSpecific, + kMtkWiFiEvent = kRange_InternalPlatformSpecific + 1, + kMtkIPEvent = kRange_InternalPlatformSpecific + 2, +}; + +} // namespace DeviceEventType + +/** + * Represents platform-specific event information for MT793x platforms. + */ +struct ChipDevicePlatformEvent final +{ + union + { + struct + { + filogic_async_event_id_t event; + uint8_t payload[MTK_EVENT_BUF_LEN]; + uint32_t length; + } FilogicEvent; + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION || CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP + struct + { + filogic_async_event_data event_data; + } MtkWiFiEvent; +#endif + struct + { + wifi_event_t event; + uint8_t * payload; + uint32_t length; + } MtkIPEvent; + }; +}; +}; // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/CHIPMem-Platform.cpp b/src/platform/mt793x/CHIPMem-Platform.cpp new file mode 100644 index 00000000000000..b66e6263b15e9e --- /dev/null +++ b/src/platform/mt793x/CHIPMem-Platform.cpp @@ -0,0 +1,164 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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. + */ + +/* + * + * Copyright (c) 2020-2021 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 + * This file implements heap memory allocation APIs for CHIP. These functions are platform + * specific and might be C Standard Library heap functions re-direction in most of cases. + * + */ + +//#include +#include + +#include "task.h" +#include + +// MT793X SDK +#include + +#include +#include +#include +#include + +extern "C" log_create_module(connsys, PRINT_LEVEL_WARNING); + +#if CHIP_CONFIG_MEMORY_MGMT_PLATFORM + +extern "C" void memMonitoringTrackAlloc(void * ptr, size_t size); +extern "C" void memMonitoringTrackFree(void * ptr, size_t size); + +#ifndef trackAlloc +#define trackAlloc(pvAddress, uiSize) memMonitoringTrackAlloc(pvAddress, uiSize) +#endif +#ifndef trackFree +#define trackFree(pvAddress, uiSize) memMonitoringTrackFree(pvAddress, uiSize) +#endif + +namespace chip { +namespace Platform { + +#define VERIFY_INITIALIZED() VerifyInitialized(__func__) + +static std::atomic_int memoryInitialized{ 0 }; + +static void VerifyInitialized(const char * func) +{ + if (!memoryInitialized) + { + fprintf(stderr, "ABORT: chip::Platform::%s() called before chip::Platform::MemoryInit()\n", func); + abort(); + } +} + +CHIP_ERROR MemoryAllocatorInit(void * buf, size_t bufSize) +{ +#ifndef NDEBUG + if (memoryInitialized++ > 0) + { + fprintf(stderr, "ABORT: chip::Platform::MemoryInit() called twice.\n"); + abort(); + } +#endif + return CHIP_NO_ERROR; +} + +void MemoryAllocatorShutdown() +{ +#ifndef NDEBUG + if (--memoryInitialized < 0) + { + fprintf(stderr, "ABORT: chip::Platform::MemoryShutdown() called twice.\n"); + abort(); + } +#endif +} + +void * MemoryAlloc(size_t size) +{ + void * ptr; + VERIFY_INITIALIZED(); + ptr = pvPortMalloc(size); + trackAlloc(ptr, size); + return ptr; +} + +void * MemoryAlloc(size_t size, bool isLongTermAlloc) +{ + void * ptr; + VERIFY_INITIALIZED(); + ptr = pvPortMalloc(size); + trackAlloc(ptr, size); + return ptr; +} + +void * MemoryCalloc(size_t num, size_t size) +{ + VERIFY_INITIALIZED(); + + void * ptr = pvPortCalloc(num, size); + trackAlloc(ptr, size * num); + return ptr; +} + +void * MemoryRealloc(void * p, size_t size) +{ + VERIFY_INITIALIZED(); + + p = pvPortRealloc(p, size); + return p; +} + +void MemoryFree(void * p) +{ + VERIFY_INITIALIZED(); + trackFree(p, 0); + vPortFree(p); +} + +bool MemoryInternalCheckPointer(const void * p, size_t min_size) +{ + return (p != nullptr); +} + +} // namespace Platform +} // namespace chip + +extern "C" __WEAK void memMonitoringTrackAlloc(void * ptr, size_t size) {} +extern "C" __WEAK void memMonitoringTrackFree(void * ptr, size_t size) {} + +#endif // CHIP_CONFIG_MEMORY_MGMT_PLATFORM diff --git a/src/platform/mt793x/CHIPPlatformConfig.h b/src/platform/mt793x/CHIPPlatformConfig.h new file mode 100644 index 00000000000000..0fb1488378afc5 --- /dev/null +++ b/src/platform/mt793x/CHIPPlatformConfig.h @@ -0,0 +1,98 @@ +/* + * + * Copyright (c) 2020-2022 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * + * 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 + * Platform-specific configuration overrides for CHIP on + * MediaTek Genio platforms. + */ + +#pragma once + +#include + +// ==================== General Platform Adaptations ==================== + +#define CHIP_CONFIG_ABORT() abort() + +#define CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE uint8_t +#define CHIP_CONFIG_PERSISTED_STORAGE_ENC_MSG_CNTR_ID 1 +#define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 2 + +#define CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY 0x01 +#define CHIP_CONFIG_PERSISTED_STORAGE_KEY_GLOBAL_MESSAGE_COUNTER 0x2 + +#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 +#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 + +// ==================== Security Adaptations ==================== + +// ==================== General Configuration Overrides ==================== + +#ifndef CHIP_CONFIG_MAX_PEER_NODES +#define CHIP_CONFIG_MAX_PEER_NODES 16 +#endif // CHIP_CONFIG_MAX_PEER_NODES + +#ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS +#define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 +#endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS + +#ifndef CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS +#define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 +#endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS + +#ifndef CHIP_CONFIG_MAX_ACTIVE_CHANNELS +#define CHIP_CONFIG_MAX_ACTIVE_CHANNELS 8 +#endif // CHIP_CONFIG_MAX_ACTIVE_CHANNELS + +#ifndef CHIP_CONFIG_MAX_CHANNEL_HANDLES +#define CHIP_CONFIG_MAX_CHANNEL_HANDLES 16 +#endif // CHIP_CONFIG_MAX_CHANNEL_HANDLES + +#ifndef CHIP_LOG_FILTERING +#define CHIP_LOG_FILTERING 0 +#endif // CHIP_LOG_FILTERING + +#ifndef CHIP_CONFIG_MAX_INTERFACES +#define CHIP_CONFIG_MAX_INTERFACES 4 +#endif // CHIP_CONFIG_MAX_INTERFACES + +#ifndef CHIP_CONFIG_MAX_LOCAL_ADDR_UDP_ENDPOINTS +#define CHIP_CONFIG_MAX_LOCAL_ADDR_UDP_ENDPOINTS 4 +#endif // CHIP_CONFIG_MAX_LOCAL_ADDR_UDP_ENDPOINTS + +/** + * @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. + */ +#ifndef CHIP_CONFIG_MAX_FABRICS +#define CHIP_CONFIG_MAX_FABRICS 5 // 4 fabrics + 1 for rotation slack +#endif + +// ==================== FreeRTOS Configuration Overrides ==================== +#ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_TASK +#define CHIP_CONFIG_FREERTOS_USE_STATIC_TASK 1 +#endif + +#ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_QUEUE +#define CHIP_CONFIG_FREERTOS_USE_STATIC_QUEUE 1 +#endif diff --git a/src/platform/mt793x/ConfigurationManagerImpl.cpp b/src/platform/mt793x/ConfigurationManagerImpl.cpp new file mode 100644 index 00000000000000..2c684390bfb5ef --- /dev/null +++ b/src/platform/mt793x/ConfigurationManagerImpl.cpp @@ -0,0 +1,270 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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 of the Device LayerConfigurationManager + * object for MT793X platforms using the MT793X SDK. + */ + +/* this file behaves like a config.h, comes first */ +#include + +#include + +#include +#include +#include + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +#ifdef MT793X_PORTING +#include "wfx_host_events.h" +#endif /* MT793X_PORTING */ +#endif +#include "stdio.h" + +namespace chip { +namespace DeviceLayer { + +using namespace ::chip::DeviceLayer::Internal; + +ConfigurationManagerImpl & ConfigurationManagerImpl::GetDefaultInstance() +{ + static ConfigurationManagerImpl sInstance; + return sInstance; +} + +CHIP_ERROR ConfigurationManagerImpl::Init() +{ + CHIP_ERROR err; + bool failSafeArmed; + + // Initialize the generic implementation base class. + err = Internal::GenericConfigurationManagerImpl::Init(); + SuccessOrExit(err); + // TODO: Initialize the global GroupKeyStore object here (#1626) + IncreaseBootCount(); + + // It is possible to configure the possible reset sources with RMU_ResetControl + // In this case, we keep Reset control at default setting + // rebootCause = RMU_ResetCauseGet(); + // RMU_ResetCauseClear(); + // If the fail-safe was armed when the device last shutdown, initiate a factory reset. + if (GetFailSafeArmed(failSafeArmed) == CHIP_NO_ERROR && failSafeArmed) + { + ChipLogProgress(DeviceLayer, "Detected fail-safe armed on reboot; initiating factory reset"); + InitiateFactoryReset(); + } + err = CHIP_NO_ERROR; + +exit: + return err; +} + +bool ConfigurationManagerImpl::CanFactoryReset() +{ + // TODO: query the application to determine if factory reset is allowed. + return true; +} + +void ConfigurationManagerImpl::InitiateFactoryReset() +{ + PlatformMgr().ScheduleWork(DoFactoryReset); +} + +CHIP_ERROR ConfigurationManagerImpl::GetRebootCount(uint32_t & rebootCount) +{ + return MT793XConfig::ReadConfigValue(MT793XConfig::kConfigKey_BootCount, rebootCount); +} + +CHIP_ERROR ConfigurationManagerImpl::IncreaseBootCount(void) +{ + uint32_t bootCount = 0; + if (MT793XConfig::ConfigValueExists(MT793XConfig::kConfigKey_BootCount)) + { + GetRebootCount(bootCount); + } + return MT793XConfig::WriteConfigValue(MT793XConfig::kConfigKey_BootCount, bootCount + 1); +} + +uint32_t ConfigurationManagerImpl::GetBootReason(void) +{ + // rebootCause is obtained at bootup. + BootReasonType matterBootCause; + matterBootCause = BootReasonType::kUnspecified; + return to_underlying(matterBootCause); +} + +CHIP_ERROR ConfigurationManagerImpl::GetTotalOperationalHours(uint32_t & totalOperationalHours) +{ + if (!MT793XConfig::ConfigValueExists(MT793XConfig::kConfigKey_TotalOperationalHours)) + { + totalOperationalHours = 0; + return CHIP_NO_ERROR; + } + + return MT793XConfig::ReadConfigValue(MT793XConfig::kConfigKey_TotalOperationalHours, totalOperationalHours); +} + +CHIP_ERROR ConfigurationManagerImpl::StoreTotalOperationalHours(uint32_t totalOperationalHours) +{ + return MT793XConfig::WriteConfigValue(MT793XConfig::kConfigKey_TotalOperationalHours, totalOperationalHours); +} + +CHIP_ERROR ConfigurationManagerImpl::ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key persistedStorageKey, + uint32_t & value) +{ + CHIP_ERROR err; + MT793XConfig::Key configKey{ MT793XConfig::kConfigNamespace_ChipCounters, (char *) &persistedStorageKey }; + + err = ReadConfigValue(configKey, value); + if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) + { + err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + } + SuccessOrExit(err); + +exit: + return err; +} + +CHIP_ERROR ConfigurationManagerImpl::WritePersistedStorageValue(::chip::Platform::PersistedStorage::Key persistedStorageKey, + uint32_t value) +{ + CHIP_ERROR err; + MT793XConfig::Key configKey{ MT793XConfig::kConfigNamespace_ChipCounters, (char *) &persistedStorageKey }; + + err = WriteConfigValue(configKey, value); + { + err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + } + SuccessOrExit(err); + +exit: + return err; +} + +CHIP_ERROR ConfigurationManagerImpl::ReadConfigValue(Key key, bool & val) +{ + return MT793XConfig::ReadConfigValue(key, val); +} + +CHIP_ERROR ConfigurationManagerImpl::ReadConfigValue(Key key, uint32_t & val) +{ + return MT793XConfig::ReadConfigValue(key, val); +} + +CHIP_ERROR ConfigurationManagerImpl::ReadConfigValue(Key key, uint64_t & val) +{ + return MT793XConfig::ReadConfigValue(key, val); +} + +CHIP_ERROR ConfigurationManagerImpl::ReadConfigValueStr(Key key, char * buf, size_t bufSize, size_t & outLen) +{ + return MT793XConfig::ReadConfigValueStr(key, buf, bufSize, outLen); +} + +CHIP_ERROR ConfigurationManagerImpl::ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSize, size_t & outLen) +{ + return MT793XConfig::ReadConfigValueBin(key, buf, bufSize, outLen); +} + +CHIP_ERROR ConfigurationManagerImpl::WriteConfigValue(Key key, bool val) +{ + return MT793XConfig::WriteConfigValue(key, val); +} + +CHIP_ERROR ConfigurationManagerImpl::WriteConfigValue(Key key, uint32_t val) +{ + return MT793XConfig::WriteConfigValue(key, val); +} + +CHIP_ERROR ConfigurationManagerImpl::WriteConfigValue(Key key, uint64_t val) +{ + return MT793XConfig::WriteConfigValue(key, val); +} + +CHIP_ERROR ConfigurationManagerImpl::WriteConfigValueStr(Key key, const char * str) +{ + return MT793XConfig::WriteConfigValueStr(key, str); +} + +CHIP_ERROR ConfigurationManagerImpl::WriteConfigValueStr(Key key, const char * str, size_t strLen) +{ + return MT793XConfig::WriteConfigValueStr(key, str, strLen); +} + +CHIP_ERROR ConfigurationManagerImpl::WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen) +{ + return MT793XConfig::WriteConfigValueBin(key, data, dataLen); +} + +void ConfigurationManagerImpl::RunConfigUnitTest(void) +{ + MT793XConfig::RunConfigUnitTest(); +} + +void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) +{ + CHIP_ERROR err; + + ChipLogProgress(DeviceLayer, "Performing factory reset"); + + err = MT793XConfig::FactoryResetConfig(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "FactoryResetConfig() failed: %s", chip::ErrorStr(err)); + } + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + + ChipLogProgress(DeviceLayer, "Clearing Thread provision"); + ThreadStackMgr().ErasePersistentInfo(); + +#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD + +#if CHIP_KVS_AVAILABLE + PersistedStorage::KeyValueStoreMgrImpl().ErasePartition(); +#endif // CHIP_KVS_AVAILABLE + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + ChipLogProgress(DeviceLayer, "Clearing WiFi provision"); +#ifdef MT793X_PORTING + wfx_clear_wifi_provision(); +#endif /* MT793X_PORTING */ +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + + // Restart the system. + ChipLogProgress(DeviceLayer, "System restarting"); + NVIC_SystemReset(); +} + +CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) +{ + if (wifi_get_mac_addr_from_efuse(1, buf) < 0) + return CHIP_ERROR_INTERNAL; + return CHIP_NO_ERROR; +} + +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/ConfigurationManagerImpl.h b/src/platform/mt793x/ConfigurationManagerImpl.h new file mode 100644 index 00000000000000..70710c805e23f6 --- /dev/null +++ b/src/platform/mt793x/ConfigurationManagerImpl.h @@ -0,0 +1,89 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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 of the Device LayerConfigurationManager + * object for MT793X platforms using the MT793X SDK. + */ + +#pragma once + +#include + +#include "MT793XConfig.h" + +namespace chip { +namespace DeviceLayer { + +/** + * Concrete implementation of the ConfigurationManager singleton object for the Genio platform. + */ +class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImpl +{ +public: + // This returns an instance of this class. + static ConfigurationManagerImpl & GetDefaultInstance(); + + uint32_t GetBootReason(void); + CHIP_ERROR GetRebootCount(uint32_t & rebootCount); + CHIP_ERROR IncreaseBootCount(void); + CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours); + CHIP_ERROR StoreTotalOperationalHours(uint32_t totalOperationalHours); + +private: + // ===== Members that implement the ConfigurationManager public interface. + + CHIP_ERROR Init(void) override; + CHIP_ERROR GetPrimaryWiFiMACAddress(uint8_t * buf) override; + bool CanFactoryReset(void) override; + void InitiateFactoryReset(void) override; + CHIP_ERROR ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t & value) override; + CHIP_ERROR WritePersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t value) override; + + // NOTE: Other public interface methods are implemented by GenericConfigurationManagerImpl<>. + + // ===== Members that implement the GenericConfigurationManagerImpl protected interface. + CHIP_ERROR ReadConfigValue(Key key, bool & val) override; + CHIP_ERROR ReadConfigValue(Key key, uint32_t & val) override; + CHIP_ERROR ReadConfigValue(Key key, uint64_t & val) override; + CHIP_ERROR ReadConfigValueStr(Key key, char * buf, size_t bufSize, size_t & outLen) override; + CHIP_ERROR ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSize, size_t & outLen) override; + CHIP_ERROR WriteConfigValue(Key key, bool val) override; + CHIP_ERROR WriteConfigValue(Key key, uint32_t val) override; + CHIP_ERROR WriteConfigValue(Key key, uint64_t val) override; + CHIP_ERROR WriteConfigValueStr(Key key, const char * str) override; + CHIP_ERROR WriteConfigValueStr(Key key, const char * str, size_t strLen) override; + CHIP_ERROR WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen) override; + void RunConfigUnitTest(void) override; + + // ===== Private members reserved for use by this class only. + uint32_t rebootCause; + static void DoFactoryReset(intptr_t arg); +}; + +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/ConnectivityManagerImpl.cpp b/src/platform/mt793x/ConnectivityManagerImpl.cpp new file mode 100644 index 00000000000000..1fc7cb48f7bd67 --- /dev/null +++ b/src/platform/mt793x/ConnectivityManagerImpl.cpp @@ -0,0 +1,92 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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. + */ +/* this file behaves like a config.h, comes first */ +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include +#endif + +#include "filogic.h" +#include "mt7933_pos.h" + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::System; +using namespace ::chip::TLV; +using namespace ::chip::DeviceLayer::Internal; + +namespace chip { +namespace DeviceLayer { + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +ConnectivityManagerImpl ConnectivityManagerImpl::sInstance; +#endif + +CHIP_ERROR ConnectivityManagerImpl::_Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + // Initialize the generic base classes that require it. +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + GenericConnectivityManagerImpl_Thread::_Init(); +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + err = WiFiInit(); + SuccessOrExit(err); +#endif + +exit: + return err; +} + +void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + // Forward the event to the generic base classes as needed. +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + GenericConnectivityManagerImpl_Thread::_OnPlatformEvent(event); +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + _OnWiFiPlatformEvent(event); +#endif +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/ConnectivityManagerImpl.h b/src/platform/mt793x/ConnectivityManagerImpl.h new file mode 100644 index 00000000000000..88f45aa9a4736c --- /dev/null +++ b/src/platform/mt793x/ConnectivityManagerImpl.h @@ -0,0 +1,263 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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 +#include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include +#else +#include +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include +#else +#include +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +#include +#else +#include +#endif + +#include "filogic.h" + +namespace Inet { +class IPAddress; +} // namespace Inet + +namespace chip { +namespace DeviceLayer { + +// class PlatformManagerImpl; + +/** + * Concrete implementation of the ConnectivityManager singleton object for MediaTek Genio platforms. + */ +class ConnectivityManagerImpl final : public ConnectivityManager, + public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + public Internal::GenericConnectivityManagerImpl_BLE, +#else + public Internal::GenericConnectivityManagerImpl_NoBLE, +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + public Internal::GenericConnectivityManagerImpl_Thread, +#else + public Internal::GenericConnectivityManagerImpl_NoThread, +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + public Internal::GenericConnectivityManagerImpl_WiFi +#else + public Internal::GenericConnectivityManagerImpl_NoWiFi +#endif +{ + // Allow the ConnectivityManager interface class to delegate method calls to + // the implementation methods provided by this class. + friend class ConnectivityManager; + +private: + // ===== Members that implement the ConnectivityManager abstract interface. + + bool _HaveIPv4InternetConnectivity(void); + bool _HaveIPv6InternetConnectivity(void); +#if 0 // CHIP_DEVICE_CONFIG_ENABLE_THREAD + bool _HaveServiceConnectivity(void); +#endif + CHIP_ERROR _Init(void); + void _OnPlatformEvent(const ChipDeviceEvent * event); + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + CHIP_ERROR WiFiInit(void); + WiFiStationMode GetFilogicStationMode(void); + WiFiAPMode GetFilogicAPMode(void); + filogic_wifi_opmode_t GetFilogicNextOpMode(WiFiStationMode wifiStationMode, WiFiAPMode wifiAPMode); + void SetFlogicNextMode(filogic_wifi_opmode_t nextMode); + void _OnWiFiPlatformEvent(const ChipDeviceEvent * event); +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + using Flags = GenericConnectivityManagerImpl_WiFi::ConnectivityFlags; + WiFiStationMode _GetWiFiStationMode(void); + CHIP_ERROR _SetWiFiStationMode(WiFiStationMode val); + CHIP_ERROR _SetWiFiStationReconnectInterval(System::Clock::Timeout val); + CHIP_ERROR _GetAndLogWifiStatsCounters(void); + bool _IsWiFiStationEnabled(void); + bool _IsWiFiStationApplicationControlled(void); + bool _IsWiFiStationConnected(void); + bool _IsWiFiStationProvisioned(void); + void _ClearWiFiStationProvision(void); + bool _CanStartWiFiScan(); + void _OnWiFiScanDone(); + void _OnWiFiStationProvisionChange(); + System::Clock::Timeout _GetWiFiStationReconnectInterval(void); +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP + void ChangeWiFiAPState(WiFiAPState newState); + void DriveAPState(void); + CHIP_ERROR ConfigureWiFiAP(void); + static void DriveAPState(::chip::System::Layer * aLayer, void * aAppState); + WiFiAPMode _GetWiFiAPMode(void); + CHIP_ERROR _SetWiFiAPMode(WiFiAPMode val); + bool _IsWiFiAPApplicationControlled(void); + bool _IsWiFiAPActive(void); + void _DemandStartWiFiAP(void); + void _StopOnDemandWiFiAP(void); + void _MaintainOnDemandWiFiAP(void); + System::Clock::Timeout _GetWiFiAPIdleTimeout(void); + void _SetWiFiAPIdleTimeout(System::Clock::Timeout val); +#endif + // ===== Members for internal use by the following friends. + + friend ConnectivityManager & ConnectivityMgr(void); + friend ConnectivityManagerImpl & ConnectivityMgrImpl(void); + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + static ConnectivityManagerImpl sInstance; +#endif + + // ===== Private members reserved for use by this class only. +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + System::Clock::Timestamp mLastStationConnectFailTime; + WiFiStationMode mWiFiStationMode; + WiFiStationState mWiFiStationState; + System::Clock::Timeout mWiFiStationReconnectInterval; + BitFlags mFlags; + + void DriveStationState(void); + void OnStationConnected(void); + void OnStationDisconnected(void); + void ChangeWiFiStationState(WiFiStationState newState); + static void DriveStationState(::chip::System::Layer * aLayer, void * aAppState); + + void UpdateInternetConnectivityState(bool haveIPv4Conn, bool haveIPv6Conn, const uint8_t * ipAddr); +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP + WiFiAPMode mWiFiAPMode; + WiFiAPState mWiFiAPState; + System::Clock::Timeout mWiFiAPIdleTimeout; + System::Clock::Timestamp mLastAPDemandTime; +#endif + void * mFilogicCtx; +}; + +inline bool ConnectivityManagerImpl::_HaveIPv4InternetConnectivity(void) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + return mFlags.Has(Flags::kHaveIPv4InternetConnectivity); +#else + return false; +#endif +} + +inline bool ConnectivityManagerImpl::_HaveIPv6InternetConnectivity(void) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + return mFlags.Has(Flags::kHaveIPv6InternetConnectivity); +#else + return false; +#endif +} + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +inline bool ConnectivityManagerImpl::_IsWiFiStationApplicationControlled(void) +{ + return mWiFiStationMode == kWiFiStationMode_ApplicationControlled; +} + +inline bool ConnectivityManagerImpl::_IsWiFiStationConnected(void) +{ + return mWiFiStationState == kWiFiStationState_Connected; +} + +inline System::Clock::Timeout ConnectivityManagerImpl::_GetWiFiStationReconnectInterval(void) +{ + return mWiFiStationReconnectInterval; +} + +inline bool ConnectivityManagerImpl::_CanStartWiFiScan() +{ + return mWiFiStationState != kWiFiStationState_Connecting; +} +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP +inline ConnectivityManager::WiFiAPMode ConnectivityManagerImpl::_GetWiFiAPMode(void) +{ + return mWiFiAPMode; +} + +inline bool ConnectivityManagerImpl::_IsWiFiAPApplicationControlled(void) +{ + return mWiFiAPMode == kWiFiAPMode_ApplicationControlled; +} + +inline bool ConnectivityManagerImpl::_IsWiFiAPActive(void) +{ + return mWiFiAPState == kWiFiAPState_Active; +} + +inline System::Clock::Timeout ConnectivityManagerImpl::_GetWiFiAPIdleTimeout(void) +{ + return mWiFiAPIdleTimeout; +} +#endif + +#if 0 // CHIP_DEVICE_CONFIG_ENABLE_THREAD +inline bool ConnectivityManagerImpl::_HaveServiceConnectivity(void) +{ + return _HaveServiceConnectivityViaThread(); +} +#endif + +/** + * + * Returns the public interface of the ConnectivityManager singleton object. + * + * Chip applications should use this to access features of the ConnectivityManager object + * that are common to all platforms. + */ +inline ConnectivityManager & ConnectivityMgr(void) +{ + return ConnectivityManagerImpl::sInstance; +} + +/** + * Returns the platform-specific implementation of the ConnectivityManager singleton object. + * + * Chip applications can use this to gain access to features of the ConnectivityManager + * that are specific to the Genio platform. + */ +inline ConnectivityManagerImpl & ConnectivityMgrImpl(void) +{ + return ConnectivityManagerImpl::sInstance; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/ConnectivityManagerImpl_WIFI.cpp b/src/platform/mt793x/ConnectivityManagerImpl_WIFI.cpp new file mode 100644 index 00000000000000..24bd2f65a6717a --- /dev/null +++ b/src/platform/mt793x/ConnectivityManagerImpl_WIFI.cpp @@ -0,0 +1,684 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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. + */ +/* this file behaves like a config.h, comes first */ +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include +#endif + +#include "mt7933_pos.h" +#include "wifi_api_ex.h" + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::System; +using namespace ::chip::TLV; +using namespace ::chip::DeviceLayer::Internal; + +namespace chip { +namespace DeviceLayer { + +CHIP_ERROR ConnectivityManagerImpl::WiFiInit(void) +{ + CHIP_ERROR err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; + + ChipLogProgress(DeviceLayer, "ConnectivityManager Wi-Fi init"); + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + // Queue work items to bootstrap the AP and station state machines once + // the Chip event loop is running. + mWiFiStationMode = kWiFiStationMode_Disabled; + mWiFiStationState = kWiFiStationState_NotConnected; + mLastStationConnectFailTime = System::Clock::kZero; + mWiFiStationReconnectInterval = System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL); +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP + mWiFiAPMode = kWiFiAPMode_Disabled; + mWiFiAPState = kWiFiAPState_NotActive; + mWiFiAPIdleTimeout = System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_WIFI_AP_IDLE_TIMEOUT); + mLastAPDemandTime = System::Clock::kZero; +#endif + mFlags.ClearAll(); + + mFilogicCtx = PlatformMgrImpl().mFilogicCtx; + + if (!IsWiFiStationProvisioned()) + { +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP + mWiFiAPMode = kWiFiAPMode_Enabled; + mWiFiAPState = kWiFiAPState_NotActive; + filogic_wifi_init_async(mFilogicCtx, FILOGIC_WIFI_OPMODE_AP); + err = CHIP_NO_ERROR; + SuccessOrExit(err); +#endif + } + else + { +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + mWiFiStationMode = kWiFiStationMode_Enabled; + mWiFiStationState = kWiFiStationState_NotConnected; + filogic_wifi_init_async(mFilogicCtx, FILOGIC_WIFI_OPMODE_STA); + err = CHIP_NO_ERROR; + SuccessOrExit(err); +#endif + } + + ChipLogProgress(DeviceLayer, "ConnectivityManager Wi-Fi init done"); + +exit: + return err; +} + +void ConnectivityManagerImpl::ChangeWiFiAPState(WiFiAPState newState) +{ + if (mWiFiAPState != newState) + { + ChipLogProgress(DeviceLayer, "WiFi AP state change: %s -> %s", WiFiAPStateToStr(mWiFiAPState), WiFiAPStateToStr(newState)); + mWiFiAPState = newState; + } +} + +void ConnectivityManagerImpl::_OnWiFiPlatformEvent(const ChipDeviceEvent * event) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + if (event->Type != DeviceEventType::kMtkWiFiEvent) + return; + + ChipLogProgress(DeviceLayer, "%s WiFi event %s", __func__, filogic_event_to_name(event->Platform.FilogicEvent.event)); + + const filogic_async_event_data * event_data; + bool hadIPv4Conn = mFlags.Has(ConnectivityFlags::kHaveIPv4InternetConnectivity); + bool hadIPv6Conn = mFlags.Has(ConnectivityFlags::kHaveIPv6InternetConnectivity); + + event_data = &event->Platform.MtkWiFiEvent.event_data; + + if (event_data->event_id == FILOGIC_WIFI_INIT_OK) + { + if (FILOGIC_WIFI_PORT_STA == event_data->u.wifi_init.port) + { + mWiFiStationState = kWiFiStationState_NotConnected; + DriveStationState(); + } + else if (FILOGIC_WIFI_PORT_AP == event_data->u.wifi_init.port) + { + ConfigureWiFiAP(); + ChangeWiFiAPState(kWiFiAPState_Activating); + } + else + assert(0); + } + else if (event_data->event_id == FILOGIC_AP_START_OK) + { + ChangeWiFiAPState(kWiFiAPState_Active); + } + else if (event_data->event_id == FILOGIC_SET_OPMODE_OK) + { + if (event_data->u.wifi_opmode.opmode == WIFI_MODE_STA_ONLY) + ChangeWiFiStationState(kWiFiStationState_NotConnected); + else if (event_data->u.wifi_opmode.opmode == WIFI_MODE_AP_ONLY) + ChangeWiFiAPState(kWiFiAPState_Active); + else + assert(0); + } + else if (event_data->event_id == FILOGIC_AP_STATION_CONNECTED) + { + MaintainOnDemandWiFiAP(); + } + else if (event_data->event_id == FILOGIC_AP_STATION_DISCONNECTED) + { + } + else if (event_data->event_id == FILOGIC_STA_DISCONNECTED_FROM_AP) + { + if (mWiFiStationState == kWiFiStationState_Connecting) + { + ChangeWiFiStationState(kWiFiStationState_Connecting_Failed); + } + DriveStationState(); + } + else if (!hadIPv4Conn && event_data->event_id == FILOGIC_STA_IPV4_ADDR_READY) + { + if (mWiFiStationState == kWiFiStationState_Connecting) + { + ChangeWiFiStationState(kWiFiStationState_Connecting_Succeeded); + } + + ChipLogProgress(DeviceLayer, "ip addr: %s", event_data->u.ipv4_str.addr); + DriveStationState(); + UpdateInternetConnectivityState(TRUE, FALSE, event_data->u.ipv4_str.addr); + } + if (!hadIPv6Conn && event_data->event_id == FILOGIC_STA_IPV6_ADDR_READY) + { + if (mWiFiStationState == kWiFiStationState_Connecting) + { + ChangeWiFiStationState(kWiFiStationState_Connecting_Succeeded); + } + + ChipLogProgress(DeviceLayer, "ipv6 addr: %s", event_data->u.ipv6_str.addr); + DriveStationState(); + UpdateInternetConnectivityState(FALSE, TRUE, event_data->u.ipv6_str.addr); + } + else if (event->Platform.FilogicEvent.event == FILOGIC_STA_CONNECTED_TO_AP) + { + ChipLogProgress(DeviceLayer, "WIFI_EVENT_STA_CONNECTED"); + if (mWiFiStationState == kWiFiStationState_Connecting) + { + ChangeWiFiStationState(kWiFiStationState_Connecting_Succeeded); + } + DriveStationState(); + } +} + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +ConnectivityManager::WiFiStationMode ConnectivityManagerImpl::GetFilogicStationMode(void) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + filogic_wifi_opmode_t opmode; + int32_t ret; + + filogic_wifi_opmode_get_sync(mFilogicCtx, &opmode); + + if (opmode == FILOGIC_WIFI_OPMODE_STA || opmode == FILOGIC_WIFI_OPMODE_DUAL) + return kWiFiStationMode_Enabled; +#endif + return kWiFiStationMode_Disabled; +} + +ConnectivityManager::WiFiAPMode ConnectivityManagerImpl::GetFilogicAPMode(void) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP + filogic_wifi_opmode_t opmode; + int32_t ret; + + filogic_wifi_opmode_get_sync(mFilogicCtx, &opmode); + + if (opmode == FILOGIC_WIFI_OPMODE_AP || opmode == FILOGIC_WIFI_OPMODE_DUAL) + return kWiFiAPMode_Enabled; +#endif + return kWiFiAPMode_Disabled; +} + +filogic_wifi_opmode_t ConnectivityManagerImpl::GetFilogicNextOpMode(WiFiStationMode staMode, WiFiAPMode apMode) +{ + bool sta, ap; + filogic_wifi_opmode_t opmode; + + ChipLogProgress(DeviceLayer, "%s %d %d", __func__, staMode, apMode); + + sta = staMode == kWiFiStationMode_Enabled; + ap = apMode == kWiFiAPMode_Enabled; + + if (sta && ap) + opmode = FILOGIC_WIFI_OPMODE_DUAL; + else if (ap) + opmode = FILOGIC_WIFI_OPMODE_AP; + else if (sta) + opmode = FILOGIC_WIFI_OPMODE_STA; + else + opmode = FILOGIC_WIFI_OPMODE_NONE; + + return opmode; +} + +void ConnectivityManagerImpl::SetFlogicNextMode(filogic_wifi_opmode_t nextMode) +{ + ChipLogProgress(DeviceLayer, "WiFi driver mode set %s", filogic_opmode_to_name(nextMode)); + filogic_wifi_opmode_set_async(mFilogicCtx, nextMode); +} +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +ConnectivityManager::WiFiStationMode ConnectivityManagerImpl::_GetWiFiStationMode(void) +{ + if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled) + { + filogic_wifi_opmode_t opmode; + + filogic_wifi_opmode_get_sync(mFilogicCtx, &opmode); + + if (opmode == FILOGIC_WIFI_OPMODE_AP) + mWiFiStationMode = kWiFiStationMode_Disabled; + else + mWiFiStationMode = kWiFiStationMode_Enabled; + } + return mWiFiStationMode; +} + +CHIP_ERROR ConnectivityManagerImpl::_SetWiFiStationMode(ConnectivityManager::WiFiStationMode val) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + if (mWiFiStationMode != val) + { + ChipLogProgress(DeviceLayer, "WiFi station mode change: %s -> %s", WiFiStationModeToStr(mWiFiStationMode), + WiFiStationModeToStr(val)); + DeviceLayer::SystemLayer().ScheduleWork(DriveStationState, NULL); + mWiFiStationMode = val; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ConnectivityManagerImpl::_SetWiFiStationReconnectInterval(System::Clock::Timeout val) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + mWiFiStationReconnectInterval = val; + return CHIP_NO_ERROR; +} + +CHIP_ERROR ConnectivityManagerImpl::_GetAndLogWifiStatsCounters(void) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + return CHIP_ERROR_NOT_IMPLEMENTED; +} + +bool ConnectivityManagerImpl::_IsWiFiStationEnabled(void) +{ + return GetWiFiStationMode() == kWiFiStationMode_Enabled; +} + +bool ConnectivityManagerImpl::_IsWiFiStationProvisioned(void) +{ + filogic_wifi_sta_prov_t prov = {}; + + /* See if we have SSID */ + if (filogic_wifi_sta_prov_get_sync(mFilogicCtx, &prov)) + { + return prov.ssid[0] != '\0'; + } + + return false; +} + +void ConnectivityManagerImpl::_ClearWiFiStationProvision(void) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled) + { +#ifdef MT793X_PORTING + wfx_clear_wifi_provision(); +#endif /* MT793X_PORTING */ + + DeviceLayer::SystemLayer().ScheduleWork(DriveStationState, NULL); + } +} + +void ConnectivityManagerImpl::_OnWiFiScanDone() +{ + // CHIP_ERROR_NOT_IMPLEMENTED +} + +void ConnectivityManagerImpl::_OnWiFiStationProvisionChange() +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + // Schedule a call to the DriveStationState method to adjust the station state as needed. + ChipLogProgress(DeviceLayer, "_ON WIFI PROVISION CHANGE"); + DeviceLayer::SystemLayer().ScheduleWork(DriveStationState, NULL); +} +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP +void ConnectivityManagerImpl::DriveAPState(void) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + WiFiAPMode driverAPMode = GetFilogicAPMode(); + filogic_wifi_opmode_t nextMode; + + ChipLogProgress(DeviceLayer, "%s", __func__); + + if (mWiFiAPMode != driverAPMode) + { + nextMode = GetFilogicNextOpMode(mWiFiStationMode, driverAPMode); + ChipLogProgress(DeviceLayer, "WiFi Driver AP mode set: %d", nextMode); + SetFlogicNextMode(nextMode); + if (driverAPMode == kWiFiAPMode_Enabled) + { + } + // TODO wait driver event + } +} + +CHIP_ERROR ConnectivityManagerImpl::ConfigureWiFiAP(void) +{ + char ssid[32]; + int ssid_len; + + ChipLogProgress(DeviceLayer, "%s", __func__); + + CHIP_ERROR err = CHIP_NO_ERROR; + + // TODO, generate + uint16_t discriminator = 0x8888; + + ssid_len = snprintf(ssid, sizeof(ssid), "%s%03X-%04X-%04X", CHIP_DEVICE_CONFIG_WIFI_AP_SSID_PREFIX, discriminator, + CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID, CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID); + int8_t channel = CHIP_DEVICE_CONFIG_WIFI_AP_CHANNEL; + + filogic_wifi_ap_config_async(mFilogicCtx, channel, ssid, ssid_len); + + return err; +} + +void ConnectivityManagerImpl::DriveAPState(::chip::System::Layer * aLayer, void * aAppState) +{ + sInstance.DriveAPState(); +} + +CHIP_ERROR ConnectivityManagerImpl::_SetWiFiAPMode(WiFiAPMode val) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrExit(val != kWiFiAPMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); + + if (mWiFiAPMode != val) + { + ChipLogProgress(DeviceLayer, "WiFi AP mode change: %s -> %s", WiFiAPModeToStr(mWiFiAPMode), WiFiAPModeToStr(val)); + } + + mWiFiAPMode = val; + +exit: + return err; +} + +void ConnectivityManagerImpl::_DemandStartWiFiAP(void) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + if (mWiFiAPMode == kWiFiAPMode_OnDemand || mWiFiAPMode == kWiFiAPMode_OnDemand_NoStationProvision) + { + mLastAPDemandTime = System::SystemClock().GetMonotonicTimestamp(); + DeviceLayer::SystemLayer().ScheduleWork(DriveAPState, NULL); + } +} + +void ConnectivityManagerImpl::_StopOnDemandWiFiAP(void) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + if (mWiFiAPMode == kWiFiAPMode_OnDemand || mWiFiAPMode == kWiFiAPMode_OnDemand_NoStationProvision) + { + mLastAPDemandTime = System::Clock::kZero; + DeviceLayer::SystemLayer().ScheduleWork(DriveAPState, NULL); + } +} + +void ConnectivityManagerImpl::_MaintainOnDemandWiFiAP(void) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + if (mWiFiAPMode == kWiFiAPMode_OnDemand || mWiFiAPMode == kWiFiAPMode_OnDemand_NoStationProvision) + { + if (mWiFiAPState == kWiFiAPState_Activating || mWiFiAPState == kWiFiAPState_Active) + { + mLastAPDemandTime = System::SystemClock().GetMonotonicTimestamp(); + } + } +} + +void ConnectivityManagerImpl::_SetWiFiAPIdleTimeout(System::Clock::Timeout val) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + mWiFiAPIdleTimeout = val; + DeviceLayer::SystemLayer().ScheduleWork(DriveAPState, NULL); +} +#endif /* CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP */ + +/**************************************************************************** + * ConnectivityManager Private Methods + ****************************************************************************/ + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +void ConnectivityManagerImpl::DriveStationState() +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + CHIP_ERROR err = CHIP_NO_ERROR; + int32_t status; + bool stationConnected; + + // Refresh the current station mode. + GetWiFiStationMode(); + + // If the station interface is NOT under application control... + if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled) + { + if (mWiFiStationMode != kWiFiStationMode_Enabled) + { + ChipLogProgress(DeviceLayer, "WiFi station mode set"); + mWiFiStationState = kWiFiStationState_NotConnected; + SetFlogicNextMode(FILOGIC_WIFI_OPMODE_STA); + return; + } + } + + stationConnected = filogic_wifi_sta_get_link_status_sync(mFilogicCtx); + + // If the station interface is currently connected ... + if (stationConnected) + { + // Advance the station state to Connected if it was previously NotConnected or + // a previously initiated connect attempt succeeded. + if (mWiFiStationState == kWiFiStationState_NotConnected || mWiFiStationState == kWiFiStationState_Connecting_Succeeded) + { + ChangeWiFiStationState(kWiFiStationState_Connected); + ChipLogProgress(DeviceLayer, "WiFi station interface connected"); + mLastStationConnectFailTime = System::Clock::kZero; + OnStationConnected(); + } + + // If the WiFi station interface is no longer enabled, or no longer provisioned, + // disconnect the station from the AP, unless the WiFi station mode is currently + // under application control. + if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled && + (mWiFiStationMode != kWiFiStationMode_Enabled || !IsWiFiStationProvisioned())) + { + ChipLogProgress(DeviceLayer, "Disconnecting WiFi station interface"); + + status = wifi_connection_disconnect_ap(); + if (status < 0) + { + ChipLogError(DeviceLayer, "WiFi disconnect : FAIL: %ld", status); + } + + ChangeWiFiStationState(kWiFiStationState_Disconnecting); + } + } + // Otherwise the station interface is NOT connected to an AP, so... + else + { + System::Clock::Timestamp now = System::SystemClock().GetMonotonicTimestamp(); + + // Advance the station state to NotConnected if it was previously Connected or Disconnecting, + // or if a previous initiated connect attempt failed. + if (mWiFiStationState == kWiFiStationState_Connected || mWiFiStationState == kWiFiStationState_Disconnecting || + mWiFiStationState == kWiFiStationState_Connecting_Failed) + { + WiFiStationState prevState = mWiFiStationState; + ChangeWiFiStationState(kWiFiStationState_NotConnected); + if (prevState != kWiFiStationState_Connecting_Failed) + { + ChipLogProgress(DeviceLayer, "WiFi station interface disconnected"); + mLastStationConnectFailTime = System::Clock::kZero; + OnStationDisconnected(); + } + else + { + mLastStationConnectFailTime = now; + } + } + + // If the WiFi station interface is now enabled and provisioned (and by implication, + // not presently under application control), AND the system is not in the process of + // scanning, then... + if (mWiFiStationMode == kWiFiStationMode_Enabled && IsWiFiStationProvisioned()) + { + // Initiate a connection to the AP if we haven't done so before, or if enough + // time has passed since the last attempt. + if (mLastStationConnectFailTime == System::Clock::kZero || + now >= mLastStationConnectFailTime + mWiFiStationReconnectInterval) + { + if (mWiFiStationState != kWiFiStationState_Connecting) + { + ChipLogProgress(DeviceLayer, "Attempting to connect WiFi"); + + status = wifi_config_reload_setting(); + + if (status < 0) + { + ChipLogError(DeviceLayer, "WiFi start connect : FAIL %ld", status); + goto exit; + } + + ChangeWiFiStationState(kWiFiStationState_Connecting); + } + } + // Otherwise arrange another connection attempt at a suitable point in the future. + else + { + System::Clock::Timestamp timeToNextConnect = (mLastStationConnectFailTime + mWiFiStationReconnectInterval) - now; + + ChipLogProgress(DeviceLayer, "Next WiFi station reconnect in %" PRIu32 " ms", + System::Clock::Milliseconds32(timeToNextConnect).count()); + + ReturnOnFailure(DeviceLayer::SystemLayer().StartTimer(timeToNextConnect, DriveStationState, NULL)); + } + } + } + +exit: + + ChipLogProgress(DeviceLayer, "Done driving station state, nothing else to do..."); +} + +void ConnectivityManagerImpl::OnStationConnected() +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + ChipDeviceEvent event; + + NetworkCommissioning::GenioWiFiDriver::GetInstance().OnConnectWiFiNetwork(); + + // Alert other components of the new state. + event.Type = DeviceEventType::kWiFiConnectivityChange; + event.WiFiConnectivityChange.Result = kConnectivity_Established; + (void) PlatformMgr().PostEvent(&event); + + UpdateInternetConnectivityState(FALSE, FALSE, NULL); +} + +void ConnectivityManagerImpl::OnStationDisconnected() +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + // TODO Invoke WARM to perform actions that occur when the WiFi station interface goes down. + + // Alert other components of the new state. + ChipDeviceEvent event; + event.Type = DeviceEventType::kWiFiConnectivityChange; + event.WiFiConnectivityChange.Result = kConnectivity_Lost; + (void) PlatformMgr().PostEvent(&event); + + UpdateInternetConnectivityState(FALSE, FALSE, NULL); +} + +void ConnectivityManagerImpl::DriveStationState(::chip::System::Layer * aLayer, void * aAppState) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + sInstance.DriveStationState(); +} + +void ConnectivityManagerImpl::ChangeWiFiStationState(WiFiStationState newState) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + if (mWiFiStationState != newState) + { + ChipLogProgress(DeviceLayer, "WiFi station state change: %s -> %s", WiFiStationStateToStr(mWiFiStationState), + WiFiStationStateToStr(newState)); + mWiFiStationState = newState; + } +} + +void ConnectivityManagerImpl::UpdateInternetConnectivityState(bool haveIPv4Conn, bool haveIPv6Conn, const uint8_t * ipAddr) +{ + ChipLogProgress(DeviceLayer, "%s", __func__); + + bool hadIPv4Conn = mFlags.Has(ConnectivityFlags::kHaveIPv4InternetConnectivity); + bool hadIPv6Conn = mFlags.Has(ConnectivityFlags::kHaveIPv6InternetConnectivity); + IPAddress addr; + + // If the WiFi station is currently in the connected state... + if (mWiFiStationState == kWiFiStationState_Connected) + { + IPAddress::FromString((char *) ipAddr, addr); + } + + // If the internet connectivity state has changed... + if (haveIPv4Conn != hadIPv4Conn || haveIPv6Conn != hadIPv6Conn) + { + // Update the current state. + mFlags.Set(ConnectivityFlags::kHaveIPv4InternetConnectivity, haveIPv4Conn) + .Set(ConnectivityFlags::kHaveIPv6InternetConnectivity, haveIPv6Conn); + + // Alert other components of the state change. + ChipDeviceEvent event; + event.Type = DeviceEventType::kInternetConnectivityChange; + event.InternetConnectivityChange.IPv4 = GetConnectivityChange(hadIPv4Conn, haveIPv4Conn); + event.InternetConnectivityChange.IPv6 = GetConnectivityChange(hadIPv6Conn, haveIPv6Conn); + event.InternetConnectivityChange.ipAddress = addr; + + (void) PlatformMgr().PostEvent(&event); + + if (haveIPv4Conn != hadIPv4Conn) + { + ChipLogProgress(DeviceLayer, "%s Internet connectivity %s", "IPv4", (haveIPv4Conn) ? "ESTABLISHED" : "LOST"); + } + + if (haveIPv6Conn != hadIPv6Conn) + { + ChipLogProgress(DeviceLayer, "%s Internet connectivity %s", "IPv6", (haveIPv6Conn) ? "ESTABLISHED" : "LOST"); + } + } +} +#endif + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/DeviceNetworkProvisioningDelegateImpl.cpp b/src/platform/mt793x/DeviceNetworkProvisioningDelegateImpl.cpp new file mode 100644 index 00000000000000..a5f1621a6cce1a --- /dev/null +++ b/src/platform/mt793x/DeviceNetworkProvisioningDelegateImpl.cpp @@ -0,0 +1,63 @@ +/* + * + * 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. + */ + +#include "DeviceNetworkProvisioningDelegateImpl.h" +#include "NetworkCommissioningWiFiDriver.h" +#include +#include + +#if CHIP_ENABLE_OPENTHREAD +#include +#endif + +namespace chip { +namespace DeviceLayer { + +CHIP_ERROR +DeviceNetworkProvisioningDelegateImpl::_ProvisionThreadNetwork(ByteSpan threadData) +{ +#if CHIP_ENABLE_OPENTHREAD + CHIP_ERROR error = CHIP_NO_ERROR; + + SuccessOrExit(error = ThreadStackMgr().SetThreadEnabled(false)); + SuccessOrExit(error = ThreadStackMgr().SetThreadProvision(threadData)); + SuccessOrExit(error = ThreadStackMgr().SetThreadEnabled(true)); +exit: + return error; +#else + return CHIP_ERROR_NOT_IMPLEMENTED; +#endif // CHIP_ENABLE_OPENTHREAD +} + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +CHIP_ERROR DeviceNetworkProvisioningDelegateImpl::_ProvisionWiFiNetwork(const char * ssid, const char * key) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + ChipLogProgress(NetworkProvisioning, "MT793x Wifi provision: SSID: %s", ssid); + err = NetworkCommissioning::GenioWiFiDriver::GetInstance().ConnectWiFiNetwork(ssid, strlen(ssid), key, strlen(key)); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NetworkProvisioning, "MT793x:WiFi:Provision network: %s", chip::ErrorStr(err)); + } + + return err; +} +#endif + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/DeviceNetworkProvisioningDelegateImpl.h b/src/platform/mt793x/DeviceNetworkProvisioningDelegateImpl.h new file mode 100644 index 00000000000000..6eb53530c0c8d1 --- /dev/null +++ b/src/platform/mt793x/DeviceNetworkProvisioningDelegateImpl.h @@ -0,0 +1,47 @@ +/* + * + * 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. + */ + +#pragma once + +#include + +namespace chip { +namespace DeviceLayer { + +namespace Internal { + +template +class GenericDeviceNetworkProvisioningDelegateImpl; + +} // namespace Internal + +class DeviceNetworkProvisioningDelegateImpl final + : public Internal::GenericDeviceNetworkProvisioningDelegateImpl +{ + friend class GenericDeviceNetworkProvisioningDelegateImpl; + +private: +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + CHIP_ERROR _ProvisionWiFiNetwork(const char * ssid, const char * passwd); +#else + CHIP_ERROR _ProvisionWiFiNetwork(const char * ssid, const char * passwd) { return CHIP_ERROR_NOT_IMPLEMENTED; } +#endif + CHIP_ERROR _ProvisionThreadNetwork(ByteSpan threadData); +}; + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/DiagnosticDataProviderImpl.cpp b/src/platform/mt793x/DiagnosticDataProviderImpl.cpp new file mode 100644 index 00000000000000..0fa3cfc9b49db8 --- /dev/null +++ b/src/platform/mt793x/DiagnosticDataProviderImpl.cpp @@ -0,0 +1,241 @@ +/* + * + * 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. + */ + +/** + * @file + * Provides an implementation of the DiagnosticDataProvider object + * for Genio platform. + */ + +#include + +#include +#include +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include +#endif +#include + +//#include "AppConfig.h" +#include "FreeRTOS.h" + +using namespace ::chip::app::Clusters::GeneralDiagnostics; + +namespace chip { +namespace DeviceLayer { + +DiagnosticDataProviderImpl & DiagnosticDataProviderImpl::GetDefaultInstance() +{ + static DiagnosticDataProviderImpl sInstance; + return sInstance; +} + +// Software Diagnostics Getters +/* + * The following Heap stats keeps track of the number of calls to allocate + * and free memory as well as the number of free bytes remaining, but says + * nothing about fragmentation. + */ +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapFree(uint64_t & currentHeapFree) +{ + size_t freeHeapSize = xPortGetFreeHeapSize(); + currentHeapFree = static_cast(freeHeapSize); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapUsed(uint64_t & currentHeapUsed) +{ + // Calculate the Heap used based on Total heap - Free heap + int64_t heapUsed = (configTOTAL_HEAP_SIZE - xPortGetFreeHeapSize()); + + // Something went wrong, this should not happen + VerifyOrReturnError(heapUsed >= 0, CHIP_ERROR_INVALID_INTEGER_VALUE); + currentHeapUsed = static_cast(heapUsed); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) +{ + // FreeRTOS records the lowest amount of available heap during runtime + // currentHeapHighWatermark wants the highest heap usage point so we calculate it here + int64_t HighestHeapUsageRecorded = (configTOTAL_HEAP_SIZE - xPortGetMinimumEverFreeHeapSize()); + + // Something went wrong, this should not happen + VerifyOrReturnError(HighestHeapUsageRecorded >= 0, CHIP_ERROR_INVALID_INTEGER_VALUE); + currentHeapHighWatermark = static_cast(HighestHeapUsageRecorded); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::ResetWatermarks() +{ + // If implemented, the server SHALL set the value of the CurrentHeapHighWatermark attribute to the + // value of the CurrentHeapUsed. + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadMetricsOut) +{ + *threadMetricsOut = NULL; + return CHIP_NO_ERROR; +} + +void DiagnosticDataProviderImpl::ReleaseThreadMetrics(ThreadMetrics * threadMetrics) +{ + while (threadMetrics) + { + ThreadMetrics * del = threadMetrics; + threadMetrics = threadMetrics->Next; + delete del; + } +} + +// General Diagnostics Getters + +CHIP_ERROR DiagnosticDataProviderImpl::GetRebootCount(uint16_t & rebootCount) +{ + uint32_t count = 0; + CHIP_ERROR err = ConfigurationMgr().GetRebootCount(count); + + if (err == CHIP_NO_ERROR) + { + VerifyOrReturnError(count <= UINT16_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + rebootCount = static_cast(count); + } + + return err; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetBootReason(BootReasonType & bootReason) +{ + uint32_t reason = 0; + CHIP_ERROR err = ConfigurationMgr().GetBootReason(reason); + + if (err == CHIP_NO_ERROR) + { + VerifyOrReturnError(reason <= UINT8_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + bootReason = static_cast(reason); + } + + return err; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetUpTime(uint64_t & upTime) +{ + System::Clock::Timestamp currentTime = System::SystemClock().GetMonotonicTimestamp(); + System::Clock::Timestamp startTime = PlatformMgrImpl().GetStartTime(); + + if (currentTime >= startTime) + { + upTime = std::chrono::duration_cast(currentTime - startTime).count(); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_INVALID_TIME; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetTotalOperationalHours(uint32_t & totalOperationalHours) +{ + uint64_t upTime = 0; + + if (GetUpTime(upTime) == CHIP_NO_ERROR) + { + uint32_t totalHours = 0; + if (ConfigurationMgr().GetTotalOperationalHours(totalHours) == CHIP_NO_ERROR) + { + VerifyOrReturnError(upTime / 3600 <= UINT32_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + totalOperationalHours = totalHours + static_cast(upTime / 3600); + return CHIP_NO_ERROR; + } + } + + return CHIP_ERROR_INVALID_TIME; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetActiveHardwareFaults(GeneralFaults & hardwareFaults) +{ +#if CHIP_CONFIG_TEST + ReturnErrorOnFailure(hardwareFaults.add(EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO)); + ReturnErrorOnFailure(hardwareFaults.add(EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR)); + ReturnErrorOnFailure(hardwareFaults.add(EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE)); + ReturnErrorOnFailure(hardwareFaults.add(EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT)); +#endif + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetActiveRadioFaults(GeneralFaults & radioFaults) +{ +#if CHIP_CONFIG_TEST + ReturnErrorOnFailure(radioFaults.add(EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT)); + ReturnErrorOnFailure(radioFaults.add(EMBER_ZCL_RADIO_FAULT_TYPE_BLE_FAULT)); +#endif + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetActiveNetworkFaults(GeneralFaults & networkFaults) +{ +#if CHIP_CONFIG_TEST + ReturnErrorOnFailure(networkFaults.add(EMBER_ZCL_NETWORK_FAULT_TYPE_HARDWARE_FAILURE)); + ReturnErrorOnFailure(networkFaults.add(EMBER_ZCL_NETWORK_FAULT_TYPE_NETWORK_JAMMED)); + ReturnErrorOnFailure(networkFaults.add(EMBER_ZCL_NETWORK_FAULT_TYPE_CONNECTION_FAILED)); +#endif + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** netifpp) +{ + NetworkInterface * ifp = new NetworkInterface(); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + const char * threadNetworkName = otThreadGetNetworkName(ThreadStackMgrImpl().OTInstance()); + ifp->name = Span(threadNetworkName, strlen(threadNetworkName)); + ifp->fabricConnected = true; + ifp->offPremiseServicesReachableIPv4.SetNonNull(false); + ifp->offPremiseServicesReachableIPv6.SetNonNull(false); + ifp->type = InterfaceType::EMBER_ZCL_INTERFACE_TYPE_THREAD; +#else + /* TODO */ +#endif + uint8_t macBuffer[ConfigurationManager::kPrimaryMACAddressLength]; + ConfigurationMgr().GetPrimary802154MACAddress(macBuffer); + ifp->hardwareAddress = ByteSpan(macBuffer, ConfigurationManager::kPrimaryMACAddressLength); + + *netifpp = ifp; + return CHIP_NO_ERROR; +} + +void DiagnosticDataProviderImpl::ReleaseNetworkInterfaces(NetworkInterface * netifp) +{ + while (netifp) + { + NetworkInterface * del = netifp; + netifp = netifp->Next; + delete del; + } +} + +DiagnosticDataProvider & GetDiagnosticDataProviderImpl() +{ + return DiagnosticDataProviderImpl::GetDefaultInstance(); +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/DiagnosticDataProviderImpl.h b/src/platform/mt793x/DiagnosticDataProviderImpl.h new file mode 100644 index 00000000000000..c28607cb304256 --- /dev/null +++ b/src/platform/mt793x/DiagnosticDataProviderImpl.h @@ -0,0 +1,69 @@ +/* + * + * 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. + */ + +/** + * @file + * Provides an implementation of the DiagnosticDataProvider object. + */ + +#pragma once + +#include + +#include + +namespace chip { +namespace DeviceLayer { + +/** + * Concrete implementation of the PlatformManager singleton object for Linux platforms. + */ +class DiagnosticDataProviderImpl : public DiagnosticDataProvider +{ +public: + static DiagnosticDataProviderImpl & GetDefaultInstance(); + + // ===== Methods that implement the PlatformManager abstract interface. + + bool SupportsWatermarks() override { return false; } + CHIP_ERROR GetCurrentHeapFree(uint64_t & currentHeapFree) override; + CHIP_ERROR GetCurrentHeapUsed(uint64_t & currentHeapUsed) override; + CHIP_ERROR GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) override; + CHIP_ERROR ResetWatermarks() override; + CHIP_ERROR GetThreadMetrics(ThreadMetrics ** threadMetricsOut) override; + void ReleaseThreadMetrics(ThreadMetrics * threadMetrics) override; + CHIP_ERROR GetRebootCount(uint16_t & rebootCount) override; + CHIP_ERROR GetBootReason(BootReasonType & bootReason) override; + CHIP_ERROR GetUpTime(uint64_t & upTime) override; + CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) override; + CHIP_ERROR GetActiveHardwareFaults(GeneralFaults & hardwareFaults) override; + CHIP_ERROR GetActiveRadioFaults(GeneralFaults & radioFaults) override; + CHIP_ERROR GetActiveNetworkFaults(GeneralFaults & networkFaults) override; + CHIP_ERROR GetNetworkInterfaces(NetworkInterface ** netifpp) override; + void ReleaseNetworkInterfaces(NetworkInterface * netifp) override; +}; + +/** + * Returns the platform-specific implementation of the DiagnosticDataProvider singleton object. + * + * Applications can use this to gain access to features of the DiagnosticDataProvider + * that are specific to the selected platform. + */ +DiagnosticDataProvider & GetDiagnosticDataProviderImpl(); + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/DnssdImpl.cpp b/src/platform/mt793x/DnssdImpl.cpp new file mode 100644 index 00000000000000..2934bce9184161 --- /dev/null +++ b/src/platform/mt793x/DnssdImpl.cpp @@ -0,0 +1,267 @@ +/* + * + * 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. + */ + +#include "lib/dnssd/platform/Dnssd.h" + +#include "dns_sd.h" +#include "lwip/mld6.h" +#include "mdns.h" +#include +#include + +#include "platform/CHIPDeviceLayer.h" +#include +#include +#include + +extern "C" { +extern void mDNSPlatformWriteLogRedirect(void (*)(const char *, const char *)); +} + +namespace { + +static constexpr uint32_t kTimeoutMilli = 3000; +static constexpr size_t kMaxResults = 20; + +} // namespace + +namespace chip { +namespace Dnssd { + +#define SERVICE_DOMAIN ("local") + +static DNSServiceRef client = NULL; +static TXTRecordRef PublishTxtRecord; + +void ChipDnssdMdnsLog(const char * level, const char * msg) +{ + ChipLogProgress(ServiceProvisioning, "%s %s", level, msg); +} + +/** + * @brief mDNS Daemon Task entry + * @param[in] void *not_used:Not used + * @return None + */ +static void mdnsd_entry(void * not_used) +{ + ChipLogProgress(ServiceProvisioning, "mdnsd_entry start"); + mdnsd_start(); + ChipLogProgress(ServiceProvisioning, "mdnsd_entry return"); + client = NULL; + vTaskDelete(NULL); +} + +CHIP_ERROR ChipDnssdInit(DnssdAsyncReturnCallback initCallback, DnssdAsyncReturnCallback errorCallback, void * context) +{ + CHIP_ERROR error = CHIP_NO_ERROR; +#if LWIP_IPV6 + struct netif * sta_if = netif_default; + ip6_addr_t mld_address; +#endif + +#if LWIP_IPV6 + sta_if->ip6_autoconfig_enabled = 1; + ip6_addr_set_solicitednode(&mld_address, netif_ip6_addr(sta_if, 0)->addr[3]); + mld6_joingroup(netif_ip6_addr(sta_if, 0), &mld_address); +#endif + + ChipLogProgress(ServiceProvisioning, "create mdnsd_task"); + + mDNSPlatformWriteLogRedirect(ChipDnssdMdnsLog); + +#if 0 +#define MDNS_STACK_SIZE ((64 * 1024) / sizeof(portSTACK_TYPE)) + static StackType_t xMDnsStack[ MDNS_STACK_SIZE ]; + static StaticTask_t xMDnsTask; + + // xTaskHandle create mDNS daemon task + if ( NULL != xTaskCreateStatic( mdnsd_entry, + "mdnsd", + MDNS_STACK_SIZE, + NULL, + TASK_PRIORITY_NORMAL, + &xMDnsStack[0], + &xMDnsTask ) ) +#else + // xTaskHandle create mDNS daemon task + if (pdPASS != xTaskCreate(mdnsd_entry, "mdnsd", (15 * 1024) / sizeof(portSTACK_TYPE), NULL, TASK_PRIORITY_NORMAL, NULL)) +#endif + { + ChipLogProgress(ServiceProvisioning, "Cannot create mdnsd_task"); + error = CHIP_ERROR_INTERNAL; + } + + initCallback(context, error); + + return error; +} + +void ChipDnssdShutdown(void) +{ + ChipLogProgress(ServiceProvisioning, "shutdown mdnsd_task not implemented"); +} + +static const char * GetProtocolString(DnssdServiceProtocol protocol) +{ + return protocol == DnssdServiceProtocol::kDnssdProtocolTcp ? "_tcp" : "_udp"; +} + +CHIP_ERROR ChipDnssdPublishService(const DnssdService * service, DnssdPublishCallback callback, void * context) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + DNSServiceErrorType err; + DNSServiceFlags flags = 0; + char ServiceType[kDnssdTypeMaxSize + 10] = { 0 }; + + (void) callback; + (void) context; + + ChipLogProgress(ServiceProvisioning, "ChipDnssdPublishService"); + + VerifyOrExit(service->mTextEntrySize <= UINT8_MAX, error = CHIP_ERROR_INVALID_ARGUMENT); + if (service->mTextEntries) + { + // Create TXT Record + TXTRecordCreate(&PublishTxtRecord, 0, NULL); + for (size_t i = 0; i < service->mTextEntrySize; i++) + { + err = TXTRecordSetValue(&PublishTxtRecord, service->mTextEntries[i].mKey, service->mTextEntries[i].mDataSize, + service->mTextEntries[i].mData); + VerifyOrExit(err == 0, error = CHIP_ERROR_INTERNAL); + } + } + + strcpy(ServiceType, service->mType); + strcat(ServiceType, "."); + strcat(ServiceType, GetProtocolString(service->mProtocol)); + + ChipLogProgress(ServiceProvisioning, "ServiceName: %s", service->mName); + ChipLogProgress(ServiceProvisioning, "ServiceType: %s", ServiceType); + ChipLogProgress(ServiceProvisioning, "ServiceDomain: %s", SERVICE_DOMAIN); + ChipLogProgress(ServiceProvisioning, "Hostname: %s", service->mHostName); + ChipLogProgress(ServiceProvisioning, "ServicePort: %d", (int) service->mPort); + + ChipLogProgress(ServiceProvisioning, "ChipDnssdPublishService - DNSServiceRegister"); + + // Register Bonjour Service + err = DNSServiceRegister(&client, // DNSServiceRef + flags, // DNSServiceFlags + kDNSServiceInterfaceIndexAny, // interface index + service->mName, // service name + ServiceType, // service type + SERVICE_DOMAIN, // domain + NULL, // host + // service->mHostName, // host + htons(service->mPort), // port + TXTRecordGetLength(&PublishTxtRecord), // txt record length + TXTRecordGetBytesPtr(&PublishTxtRecord), // txt record pointer + NULL, // callback + NULL); // context + VerifyOrExit(err == 0, error = CHIP_ERROR_INTERNAL); + +exit: + // if (items != nullptr) + // { + // chip::Platform::MemoryFree(items); + // } + + return error; +} + +CHIP_ERROR ChipDnssdRemoveServices() +{ + // return mdns_service_remove_all() == ESP_OK ? CHIP_NO_ERROR : CHIP_ERROR_INTERNAL; + ChipLogProgress(ServiceProvisioning, "ChipDnssdRemoveServices"); + TXTRecordDeallocate(&PublishTxtRecord); + DNSServiceRefDeallocate(client); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ChipDnssdFinalizeServiceUpdate() +{ + return CHIP_NO_ERROR; +} + +static DNSServiceRef BrowseClient = NULL; + +void ChipDNSServiceBrowseReply(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode, + const char * serviceName, const char * regtype, const char * replyDomain, void * context) +{ + DnssdBrowseCallback ChipBrowseHandler = (DnssdBrowseCallback) context; + DnssdService service; + + ChipLogProgress(ServiceProvisioning, "ChipDNSServiceBrowseReply %s", serviceName); + strcpy(service.mName, serviceName); + + ChipBrowseHandler(NULL, &service, 1, true, CHIP_NO_ERROR); +} + +CHIP_ERROR ChipDnssdBrowse(const char * type, DnssdServiceProtocol protocol, chip::Inet::IPAddressType addressType, + chip::Inet::InterfaceId interface, DnssdBrowseCallback callback, void * context) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + DNSServiceErrorType err; + char ServiceType[kDnssdTypeMaxSize + 10] = { 0 }; + + (void) addressType; + ChipLogProgress(ServiceProvisioning, "ChipDnssdBrowse %s", type); + strcpy(ServiceType, type); + strcat(ServiceType, "."); + strcat(ServiceType, GetProtocolString(protocol)); + err = DNSServiceBrowse(&BrowseClient, 0, 0, ServiceType, SERVICE_DOMAIN, ChipDNSServiceBrowseReply, (void *) callback); + ChipLogProgress(ServiceProvisioning, "DNSServiceBrowse %d", (int) err); + if (err) + { + error = CHIP_ERROR_INTERNAL; + } + return error; +} + +static DNSServiceRef ResolveClient = NULL; + +void ChipDNSServiceResolveReply(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode, + const char * fullname, const char * hosttarget, uint16_t port, + /* In network byte order */ uint16_t txtLen, const unsigned char * txtRecord, void * context) +{ + ChipLogProgress(ServiceProvisioning, "ChipDNSServiceResolveReply"); +} + +CHIP_ERROR ChipDnssdResolve(DnssdService * service, chip::Inet::InterfaceId interface, DnssdResolveCallback callback, + void * context) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + DNSServiceErrorType err; + char ServiceType[kDnssdTypeMaxSize + 10] = { 0 }; + + ChipLogProgress(ServiceProvisioning, "ChipDnssdResolve %s", service->mName); + strcpy(ServiceType, service->mType); + strcat(ServiceType, "."); + strcat(ServiceType, GetProtocolString(service->mProtocol)); + + err = DNSServiceResolve(&ResolveClient, 0, 0, service->mName, ServiceType, SERVICE_DOMAIN, ChipDNSServiceResolveReply, + (void *) callback); + ChipLogProgress(ServiceProvisioning, "DNSServiceResolve %d", (int) err); + if (err) + { + error = CHIP_ERROR_INTERNAL; + } + return error; +} + +} // namespace Dnssd +} // namespace chip diff --git a/src/platform/mt793x/InetPlatformConfig.h b/src/platform/mt793x/InetPlatformConfig.h new file mode 100644 index 00000000000000..e270a63641aa6a --- /dev/null +++ b/src/platform/mt793x/InetPlatformConfig.h @@ -0,0 +1,53 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * + * 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 + * Platform-specific configuration overrides for the CHIP Inet + * Layer on Genio platforms using the MediaTek SDK. + * + */ + +#pragma once + +#include + +// ==================== Platform Adaptations ==================== + +#define INET_CONFIG_ERROR_TYPE int32_t +#define INET_CONFIG_NO_ERROR 0 +#define INET_CONFIG_ERROR_MIN 1000000 +#define INET_CONFIG_ERROR_MAX 1000999 + +#ifndef INET_CONFIG_ENABLE_IPV4 +#ifdef SL_WIFI +#define INET_CONFIG_ENABLE_IPV4 1 +#else /* For Thread only devices */ +#define INET_CONFIG_ENABLE_IPV4 0 +#endif +#endif + +// ========== Platform-specific Configuration Overrides ========= + +#ifndef INET_CONFIG_NUM_TCP_ENDPOINTS +#define INET_CONFIG_NUM_TCP_ENDPOINTS 4 +#endif // INET_CONFIG_NUM_TCP_ENDPOINTS + +#ifndef INET_CONFIG_NUM_UDP_ENDPOINTS +#define INET_CONFIG_NUM_UDP_ENDPOINTS 6 +#endif // INET_CONFIG_NUM_UDP_ENDPOINTS diff --git a/src/platform/mt793x/KeyValueStoreManagerImpl.cpp b/src/platform/mt793x/KeyValueStoreManagerImpl.cpp new file mode 100644 index 00000000000000..bd7ca83fe2c78f --- /dev/null +++ b/src/platform/mt793x/KeyValueStoreManagerImpl.cpp @@ -0,0 +1,137 @@ +/* + * + * Copyright (c) 2021 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 + * Platform-specific key value storage implementation for Genio + */ + +#include + +/* ignore GCC Wconversion warnings for pigweed */ +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + +//#include + +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + +namespace chip { +namespace DeviceLayer { +namespace PersistedStorage { + +KeyValueStoreManagerImpl KeyValueStoreManagerImpl::sInstance; + +/** + * MT793x KVS Implemetation + */ +CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t value_size, size_t * read_bytes_size, + size_t offset_bytes) const +{ + CHIP_ERROR err; + nvdm_status_t nvdm_status; + + nvdm_status = nvdm_read_data_item(kNamespace, key, (uint8_t *) value, (uint32_t *) &value_size); + if (read_bytes_size) + { + *read_bytes_size = value_size; + } + err = MapNvdmStatus(nvdm_status); + + return err; +} + +CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, size_t value_size) +{ + CHIP_ERROR err; + nvdm_status_t nvdm_status; + + nvdm_status = nvdm_write_data_item(kNamespace, key, NVDM_DATA_ITEM_TYPE_RAW_DATA, (uint8_t *) value, value_size); + err = MapNvdmStatus(nvdm_status); + + return err; +} + +CHIP_ERROR KeyValueStoreManagerImpl::_Delete(const char * key) +{ + CHIP_ERROR err; + nvdm_status_t nvdm_status; + + nvdm_status = nvdm_delete_data_item(kNamespace, key); + err = MapNvdmStatus(nvdm_status); + + return err; +} + +CHIP_ERROR KeyValueStoreManagerImpl::ErasePartition() +{ + CHIP_ERROR err; + nvdm_status_t nvdm_status; + + nvdm_status = nvdm_delete_group(kNamespace); + err = MapNvdmStatus(nvdm_status); + + return err; +} + +CHIP_ERROR KeyValueStoreManagerImpl::MapNvdmStatus(nvdm_status_t nvdm_status) +{ + CHIP_ERROR err; + + // NVDM_STATUS_INVALID_PARAMETER = -5, /**< The user parameter is invalid. */ + // NVDM_STATUS_ITEM_NOT_FOUND = -4, /**< The data item wasn't found by the NVDM. */ + // NVDM_STATUS_INSUFFICIENT_SPACE = -3, /**< No space is available in the flash. */ + // NVDM_STATUS_INCORRECT_CHECKSUM = -2, /**< The NVDM found a checksum error when reading the data item. */ + // NVDM_STATUS_ERROR = -1, /**< An unknown error occurred. */ + // NVDM_STATUS_OK = 0, /**< The operation was successful. */ + + switch (nvdm_status) + { + case NVDM_STATUS_OK: + err = CHIP_NO_ERROR; + break; + case NVDM_STATUS_ITEM_NOT_FOUND: + err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + break; + case NVDM_STATUS_INCORRECT_CHECKSUM: + err = CHIP_ERROR_INTEGRITY_CHECK_FAILED; + break; + case NVDM_STATUS_INSUFFICIENT_SPACE: + err = CHIP_ERROR_BUFFER_TOO_SMALL; + break; + case NVDM_STATUS_INVALID_PARAMETER: + err = CHIP_ERROR_INVALID_ARGUMENT; + break; + case NVDM_STATUS_ERROR: + err = CHIP_ERROR_INTERNAL; + break; + default: + err = CHIP_ERROR_INTERNAL; + break; + } + + return err; +} + +} // namespace PersistedStorage +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/KeyValueStoreManagerImpl.h b/src/platform/mt793x/KeyValueStoreManagerImpl.h new file mode 100644 index 00000000000000..f0c380c2c08931 --- /dev/null +++ b/src/platform/mt793x/KeyValueStoreManagerImpl.h @@ -0,0 +1,122 @@ +/* + * + * Copyright (c) 2021 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 + * Platform-specific key value storage implementation for Genio. + * + */ + +#pragma once + +#include "nvdm.h" + +/* ignore GCC Wconversion warnings for pigweed */ +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + +//#include +//#include +//#include + +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + +// KVS is only available for Genio when these macros are defined. +//#if defined(CHIP_KVS_SECTOR_COUNT) && defined(CHIP_KVS_BASE_SECTOR_INDEX) +//#define CHIP_KVS_AVAILABLE 1 +//#else // defined(CHIP_KVS_SECTOR_COUNT) && defined(CHIP_KVS_BASE_ADDRESS) +//#define CHIP_KVS_AVAILABLE 0 +//#endif // defined(CHIP_KVS_SECTOR_COUNT) && defined(CHIP_KVS_BASE_ADDRESS) + +namespace chip { +namespace DeviceLayer { +namespace PersistedStorage { + +/** + * + * MT793x KVS implementation + */ + +class KeyValueStoreManagerImpl final : public KeyValueStoreManager +{ + // Allow the KeyValueStoreManager interface class to delegate method calls to + // the implementation methods provided by this class. + friend class KeyValueStoreManager; + +public: + void Init() + { /*nvdm_init();*/ + } + + CHIP_ERROR _Get(const char * key, void * value, size_t value_size, size_t * read_bytes_size = nullptr, size_t offset = 0) const; + + CHIP_ERROR _Delete(const char * key); + + /** + * @brief + * Erases all data in the KVS partition, KVS needs to be initialized after + * this operation. + * + * @return CHIP_NO_ERROR the partiton was erased. + * CHIP_ERROR_TIMEOUT timed out while doing erase. + * CHIP_ERROR_ACCESS_DENIED flash locked, erase failed. + */ + CHIP_ERROR ErasePartition(); + + CHIP_ERROR _Put(const char * key, const void * value, size_t value_size); + +private: + const char * kNamespace = "CHIP_KVS"; + static CHIP_ERROR MapNvdmStatus(nvdm_status_t nvdm_status); + // ===== Members for internal use by the following friends. + + friend KeyValueStoreManager & KeyValueStoreMgr(); + friend KeyValueStoreManagerImpl & KeyValueStoreMgrImpl(); + + static KeyValueStoreManagerImpl sInstance; +}; + +/** + * Returns the public interface of the KeyValueStoreManager singleton object. + * + * Chip applications should use this to access features of the KeyValueStoreManager object + * that are common to all platforms. + */ +inline KeyValueStoreManager & KeyValueStoreMgr(void) +{ + return KeyValueStoreManagerImpl::sInstance; +} + +/** + * Returns the platform-specific implementation of the KeyValueStoreManager singleton object. + * + * Chip applications can use this to gain access to features of the KeyValueStoreManager + * that are specific to the Genio platform. + */ +inline KeyValueStoreManagerImpl & KeyValueStoreMgrImpl(void) +{ + return KeyValueStoreManagerImpl::sInstance; +} + +} // namespace PersistedStorage +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/Logging.cpp b/src/platform/mt793x/Logging.cpp new file mode 100644 index 00000000000000..3fb9940187a7ed --- /dev/null +++ b/src/platform/mt793x/Logging.cpp @@ -0,0 +1,168 @@ +/* See Project CHIP LICENSE file for licensing information. */ +#include + +#include +#include + +#include +#include + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include +#endif + +#include +#include +#include +#include +#include + +#define MT793X_LOG_ENABLED (1) + +#ifdef PW_RPC_ENABLED +#include "PigweedLogger.h" +#endif + +#define LOG_ERROR " " +#define LOG_WARN " " +#define LOG_INFO " " +#define LOG_DETAIL " " +#define LOG_LWIP " " +#define LOG_MT793X " " +// If a new category string LOG_* is created, add it in the MaxStringLength arguments below +static constexpr size_t kMaxCategoryStrLen = chip::MaxStringLength(LOG_ERROR, LOG_WARN, LOG_INFO, LOG_DETAIL, LOG_LWIP, LOG_MT793X); + +#if MT793X_LOG_ENABLED +static bool sLogInitialized = false; +#endif + +#if MT793X_LOG_ENABLED +static void PrintLog(const char * msg) +{ + /*if (sLogInitialized) + { + size_t sz; + sz = strlen(msg); +#ifdef PW_RPC_ENABLED + PigweedLogger::putString(msg, sz); +#endif + + const char * newline = "\r\n"; + sz = strlen(newline); +#ifdef PW_RPC_ENABLED + PigweedLogger::putString(newline, sz); +#endif + }*/ + + printf("%s\n", msg); +} +#endif // MT793X_LOG_ENABLED + +namespace chip { +namespace DeviceLayer { + +/** + * Called whenever a log message is emitted by Chip or LwIP. + * + * This function is intended be overridden by the application to, e.g., + * schedule output of queued log entries. + */ +void __attribute__((weak)) OnLogOutput(void) {} + +} // namespace DeviceLayer +} // namespace chip + +#include "stdio.h" + +namespace chip { +namespace Logging { +namespace Platform { + +/** + * CHIP log output functions. + */ +void LogV(const char * module, uint8_t category, const char * aFormat, va_list v) +{ +#if MT793X_LOG_ENABLED && _CHIP_USE_LOGGING + if (IsCategoryEnabled(category)) + { + char formattedMsg[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; + size_t formattedMsgLen; + + // len for Category string + "[" + Module name + "] " (Brackets and space =3) + constexpr size_t maxPrefixLen = kMaxCategoryStrLen + chip::Logging::kMaxModuleNameLen + 3; + static_assert(sizeof(formattedMsg) > maxPrefixLen); // Greater than to at least accommodate a ending Null Character + + switch (category) + { + case kLogCategory_Error: + strcpy(formattedMsg, LOG_ERROR); + break; + case kLogCategory_Progress: + default: + strcpy(formattedMsg, LOG_INFO); + break; + case kLogCategory_Detail: + strcpy(formattedMsg, LOG_DETAIL); + break; + } + + formattedMsgLen = strlen(formattedMsg); + + // Form the log prefix, e.g. "[DL] " + snprintf(formattedMsg + formattedMsgLen, sizeof(formattedMsg) - formattedMsgLen, "[%s] ", module); + formattedMsg[sizeof(formattedMsg) - 1] = 0; + formattedMsgLen = strlen(formattedMsg); + + size_t len = vsnprintf(formattedMsg + formattedMsgLen, sizeof formattedMsg - formattedMsgLen, aFormat, v); + + if (len >= sizeof formattedMsg - formattedMsgLen) + { + formattedMsg[sizeof formattedMsg - 1] = '\0'; + } + + PrintLog(formattedMsg); + } + + // Let the application know that a log message has been emitted. + chip::DeviceLayer::OnLogOutput(); +#endif // MT793X_LOG_ENABLED && _CHIP_USE_LOGGING +} + +} // namespace Platform +} // namespace Logging +} // namespace chip + +/** + * LwIP log output function. + */ +extern "C" void LwIPLog(const char * aFormat, ...) +{ + va_list v; + + va_start(v, aFormat); +#if MT793X_LOG_ENABLED + char formattedMsg[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; + + strcpy(formattedMsg, LOG_LWIP); + size_t prefixLen = strlen(formattedMsg); + size_t len = vsnprintf(formattedMsg + prefixLen, sizeof formattedMsg - prefixLen, aFormat, v); + + if (len >= sizeof formattedMsg - prefixLen) + { + formattedMsg[sizeof formattedMsg - 1] = '\0'; + } + + PrintLog(formattedMsg); + +#if configCHECK_FOR_STACK_OVERFLOW + // Force a stack overflow check. + if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) + taskYIELD(); +#endif + + // Let the application know that a log message has been emitted. + chip::DeviceLayer::OnLogOutput(); +#endif // MT793X_LOG_ENABLED + va_end(v); +} diff --git a/src/platform/mt793x/MT793XConfig.cpp b/src/platform/mt793x/MT793XConfig.cpp new file mode 100644 index 00000000000000..2d9efe1d4cf6fd --- /dev/null +++ b/src/platform/mt793x/MT793XConfig.cpp @@ -0,0 +1,449 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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 + * Utilities for accessing persisted device configuration on + * platforms based on the MediaTek SDK. + */ +/* this file behaves like a config.h, comes first */ +#include + +#include + +#include +#include + +#include "FreeRTOS.h" +#include "nvdm.h" + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +// Factory config keys +const MT793XConfig::Key MT793XConfig::kConfigKey_SerialNum = { .Namespace = kConfigNamespace_ChipFactory, .Name = "serial-num" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_UniqueId = { .Namespace = kConfigNamespace_ChipFactory, .Name = "unique-id" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_MfrDeviceId = { .Namespace = kConfigNamespace_ChipFactory, .Name = "device-id" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_MfrDeviceCert = { .Namespace = kConfigNamespace_ChipFactory, + .Name = "device-cert" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_MfrDevicePrivateKey = { .Namespace = kConfigNamespace_ChipFactory, + .Name = "device-key" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_ManufacturingDate = { .Namespace = kConfigNamespace_ChipFactory, + .Name = "mfg-date" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_SetupPinCode = { .Namespace = kConfigNamespace_ChipFactory, .Name = "pin-code" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_MfrDeviceICACerts = { .Namespace = kConfigNamespace_ChipFactory, + .Name = "device-ca-certs" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_SetupDiscriminator = { .Namespace = kConfigNamespace_ChipFactory, + .Name = "discriminator" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_Spake2pIterationCount = { .Namespace = kConfigNamespace_ChipFactory, + .Name = "iteration-count" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_Spake2pSalt = { .Namespace = kConfigNamespace_ChipFactory, .Name = "salt" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_Spake2pVerifier = { .Namespace = kConfigNamespace_ChipFactory, + .Name = "verifier" }; +// CHIP Config Keys +const MT793XConfig::Key MT793XConfig::kConfigKey_FabricId = { .Namespace = kConfigNamespace_ChipConfig, .Name = "fabric-id" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_ServiceConfig = { .Namespace = kConfigNamespace_ChipConfig, + .Name = "service-config" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_PairedAccountId = { .Namespace = kConfigNamespace_ChipConfig, + .Name = "account-id" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_ServiceId = { .Namespace = kConfigNamespace_ChipConfig, .Name = "service-id" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_FabricSecret = { .Namespace = kConfigNamespace_ChipConfig, + .Name = "fabric-secret" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_LastUsedEpochKeyId = { .Namespace = kConfigNamespace_ChipConfig, + .Name = "last-ek-id" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_FailSafeArmed = { .Namespace = kConfigNamespace_ChipConfig, + .Name = "fail-safe-armed" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_GroupKey = { .Namespace = kConfigNamespace_ChipConfig, .Name = "group-key" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_HardwareVersion = { .Namespace = kConfigNamespace_ChipConfig, + .Name = "hardware-ver" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_RegulatoryLocation = { .Namespace = kConfigNamespace_ChipConfig, + .Name = "reg-location" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_CountryCode = { .Namespace = kConfigNamespace_ChipConfig, .Name = "country-code" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_Breadcrumb = { .Namespace = kConfigNamespace_ChipConfig, .Name = "breadcrumb" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_WiFiSSID = { .Namespace = kConfigNamespace_ChipConfig, .Name = "wifi-ssid" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_WiFiPSK = { .Namespace = kConfigNamespace_ChipConfig, .Name = "wifi-psk" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_WiFiSEC = { .Namespace = kConfigNamespace_ChipConfig, .Name = "wifi-sec" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_GroupKeyBase = { .Namespace = kConfigNamespace_ChipConfig, + .Name = "group-key-base" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_GroupKeyMax = { .Namespace = kConfigNamespace_ChipConfig, + .Name = "group-key-max" }; +// CHIP Counter Keys +const MT793XConfig::Key MT793XConfig::kConfigKey_BootCount = { .Namespace = kConfigNamespace_ChipCounters, .Name = "boot-count" }; +const MT793XConfig::Key MT793XConfig::kConfigKey_TotalOperationalHours = { .Namespace = kConfigNamespace_ChipCounters, + .Name = "total-hours" }; + +#define NVDM_SEM_TIMEOUT_MS 5 + +static SemaphoreHandle_t nvdm_sem; +static StaticSemaphore_t nvdm_sem_struct; + +CHIP_ERROR MT793XConfig::Init() +{ + CHIP_ERROR err; + nvdm_status_t nvdm_status; + + nvdm_sem = xSemaphoreCreateBinaryStatic(&nvdm_sem_struct); + + if (nvdm_sem == NULL) + { + return CHIP_ERROR_NO_MEMORY; + } + + nvdm_status = nvdm_init(); + err = MapNvdmStatus(nvdm_status); + SuccessOrExit(err); + +exit: + OnExit(); + return CHIP_NO_ERROR; +} + +CHIP_ERROR MT793XConfig::ReadConfigValue(Key key, bool & val) +{ + CHIP_ERROR err; + uint32_t intVal; + uint32_t len = sizeof(bool); + + if (pdFALSE == xSemaphoreTake(nvdm_sem, pdMS_TO_TICKS(NVDM_SEM_TIMEOUT_MS))) + { + err = CHIP_ERROR_TIMEOUT; + SuccessOrExit(err); + } + + // Get NVDM item + err = MapNvdmStatus(nvdm_read_data_item(key.Namespace, key.Name, (uint8_t *) &intVal, &len)); + SuccessOrExit(err); + + val = (intVal != 0); + +exit: + OnExit(); + return err; +} + +CHIP_ERROR MT793XConfig::ReadConfigValue(Key key, uint32_t & val) +{ + CHIP_ERROR err; + uint32_t len = sizeof(uint32_t); + + if (pdFALSE == xSemaphoreTake(nvdm_sem, pdMS_TO_TICKS(NVDM_SEM_TIMEOUT_MS))) + { + err = CHIP_ERROR_TIMEOUT; + SuccessOrExit(err); + } + // Get NVDM item + err = MapNvdmStatus(nvdm_read_data_item(key.Namespace, key.Name, (uint8_t *) &val, &len)); + SuccessOrExit(err); +exit: + OnExit(); + return err; +} + +CHIP_ERROR MT793XConfig::ReadConfigValue(Key key, uint64_t & val) +{ + CHIP_ERROR err; + uint32_t len = sizeof(uint64_t); + + if (pdFALSE == xSemaphoreTake(nvdm_sem, pdMS_TO_TICKS(NVDM_SEM_TIMEOUT_MS))) + { + err = CHIP_ERROR_TIMEOUT; + SuccessOrExit(err); + } + + // Get NVDM item + err = MapNvdmStatus(nvdm_read_data_item(key.Namespace, key.Name, (uint8_t *) &val, &len)); + SuccessOrExit(err); + +exit: + OnExit(); + return err; +} + +CHIP_ERROR MT793XConfig::ReadConfigValueStr(Key key, char * buf, size_t bufSize, size_t & outLen) +{ + CHIP_ERROR err; + outLen = bufSize; + if (pdFALSE == xSemaphoreTake(nvdm_sem, pdMS_TO_TICKS(NVDM_SEM_TIMEOUT_MS))) + { + err = CHIP_ERROR_TIMEOUT; + SuccessOrExit(err); + } + + // Get NVDM item + err = MapNvdmStatus(nvdm_read_data_item(key.Namespace, key.Name, (uint8_t *) buf, (uint32_t *) &outLen)); + SuccessOrExit(err); + +exit: + OnExit(); + return err; +} + +CHIP_ERROR MT793XConfig::ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSize, size_t & outLen) +{ + CHIP_ERROR err; + outLen = bufSize; + if (pdFALSE == xSemaphoreTake(nvdm_sem, pdMS_TO_TICKS(NVDM_SEM_TIMEOUT_MS))) + { + err = CHIP_ERROR_TIMEOUT; + SuccessOrExit(err); + } + + // Get NVDM item + err = MapNvdmStatus(nvdm_read_data_item(key.Namespace, key.Name, (uint8_t *) buf, (uint32_t *) &outLen)); + SuccessOrExit(err); + +exit: + OnExit(); + return err; +} + +CHIP_ERROR MT793XConfig::ReadConfigValueCounter(uint8_t counterIdx, uint32_t & val) +{ + val = 0; + return CHIP_NO_ERROR; +} + +CHIP_ERROR MT793XConfig::WriteConfigValue(Key key, bool val) +{ + CHIP_ERROR err; + uint32_t intVal = val ? 1 : 0; + uint32_t len = sizeof(bool); + + if (pdFALSE == xSemaphoreTake(nvdm_sem, pdMS_TO_TICKS(NVDM_SEM_TIMEOUT_MS))) + { + err = CHIP_ERROR_TIMEOUT; + SuccessOrExit(err); + } + + // Set NVDM item + err = MapNvdmStatus(nvdm_write_data_item(key.Namespace, key.Name, NVDM_DATA_ITEM_TYPE_RAW_DATA, (uint8_t *) &intVal, len)); + SuccessOrExit(err); +exit: + OnExit(); + return err; +} + +CHIP_ERROR MT793XConfig::WriteConfigValue(Key key, uint32_t val) +{ + CHIP_ERROR err; + uint32_t len = sizeof(uint32_t); + + if (pdFALSE == xSemaphoreTake(nvdm_sem, pdMS_TO_TICKS(NVDM_SEM_TIMEOUT_MS))) + { + err = CHIP_ERROR_TIMEOUT; + SuccessOrExit(err); + } + + // Set NVDM item + err = MapNvdmStatus(nvdm_write_data_item(key.Namespace, key.Name, NVDM_DATA_ITEM_TYPE_RAW_DATA, (uint8_t *) &val, len)); + SuccessOrExit(err); +exit: + OnExit(); + return err; +} + +CHIP_ERROR MT793XConfig::WriteConfigValue(Key key, uint64_t val) +{ + CHIP_ERROR err; + uint32_t len = sizeof(uint64_t); + + if (pdFALSE == xSemaphoreTake(nvdm_sem, pdMS_TO_TICKS(NVDM_SEM_TIMEOUT_MS))) + { + err = CHIP_ERROR_TIMEOUT; + SuccessOrExit(err); + } + + // Set NVDM item + err = MapNvdmStatus(nvdm_write_data_item(key.Namespace, key.Name, NVDM_DATA_ITEM_TYPE_RAW_DATA, (uint8_t *) &val, len)); + SuccessOrExit(err); +exit: + OnExit(); + return err; +} + +CHIP_ERROR MT793XConfig::WriteConfigValueStr(Key key, const char * str) +{ + return WriteConfigValueStr(key, str, (str != NULL) ? strlen(str) : 0); +} + +CHIP_ERROR MT793XConfig::WriteConfigValueStr(Key key, const char * str, size_t strLen) +{ + CHIP_ERROR err; + + if (pdFALSE == xSemaphoreTake(nvdm_sem, pdMS_TO_TICKS(NVDM_SEM_TIMEOUT_MS))) + { + err = CHIP_ERROR_TIMEOUT; + SuccessOrExit(err); + } + + // Set NVDM item + err = MapNvdmStatus(nvdm_write_data_item(key.Namespace, key.Name, NVDM_DATA_ITEM_TYPE_STRING, (uint8_t *) str, strLen)); + SuccessOrExit(err); +exit: + OnExit(); + return err; +} + +CHIP_ERROR MT793XConfig::WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen) +{ + CHIP_ERROR err; + + if (pdFALSE == xSemaphoreTake(nvdm_sem, pdMS_TO_TICKS(NVDM_SEM_TIMEOUT_MS))) + { + err = CHIP_ERROR_TIMEOUT; + SuccessOrExit(err); + } + + // Set NVDM item + err = MapNvdmStatus(nvdm_write_data_item(key.Namespace, key.Name, NVDM_DATA_ITEM_TYPE_RAW_DATA, (uint8_t *) data, dataLen)); + SuccessOrExit(err); +exit: + OnExit(); + return err; +} + +CHIP_ERROR MT793XConfig::WriteConfigValueCounter(uint8_t counterIdx, uint32_t val) +{ + return CHIP_NO_ERROR; +} + +CHIP_ERROR MT793XConfig::ClearConfigValue(Key key) +{ + CHIP_ERROR err; + + if (pdFALSE == xSemaphoreTake(nvdm_sem, pdMS_TO_TICKS(NVDM_SEM_TIMEOUT_MS))) + { + err = CHIP_ERROR_TIMEOUT; + SuccessOrExit(err); + } + + // Delete NVDM item + err = MapNvdmStatus(nvdm_delete_data_item(key.Namespace, key.Name)); + SuccessOrExit(err); +exit: + OnExit(); + return err; +} + +bool MT793XConfig::ConfigValueExists(Key key) +{ + CHIP_ERROR err; + char group_name[32]; + char data_item_name[32]; + bool ret = false; + if (pdFALSE == xSemaphoreTake(nvdm_sem, pdMS_TO_TICKS(NVDM_SEM_TIMEOUT_MS))) + { + err = CHIP_ERROR_TIMEOUT; + SuccessOrExit(err); + } + + // Query NVDM item + nvdm_query_begin(); + while (nvdm_query_next_group_name(group_name) == NVDM_STATUS_OK) + { + if (!strcmp(group_name, key.Namespace)) + { + while (nvdm_query_next_data_item_name(data_item_name) == NVDM_STATUS_OK) + { + if (!strcmp(data_item_name, key.Name)) + { + ret = true; + } + } + } + } + nvdm_query_end(); + +exit: + OnExit(); + return ret; +} + +CHIP_ERROR MT793XConfig::FactoryResetConfig(void) +{ + CHIP_ERROR err; + + if (pdFALSE == xSemaphoreTake(nvdm_sem, pdMS_TO_TICKS(NVDM_SEM_TIMEOUT_MS))) + { + err = CHIP_ERROR_TIMEOUT; + SuccessOrExit(err); + } + + // Deletes all 'Config' type objects + // Note- 'Factory' and 'Counter' type are NOT deleted. + err = MapNvdmStatus(nvdm_delete_group(kConfigNamespace_ChipConfig)); + SuccessOrExit(err); +exit: + OnExit(); + return err; +} + +CHIP_ERROR MT793XConfig::MapNvdmStatus(nvdm_status_t nvdm_status) +{ + CHIP_ERROR err; + + // NVDM_STATUS_INVALID_PARAMETER = -5, /**< The user parameter is invalid. */ + // NVDM_STATUS_ITEM_NOT_FOUND = -4, /**< The data item wasn't found by the NVDM. */ + // NVDM_STATUS_INSUFFICIENT_SPACE = -3, /**< No space is available in the flash. */ + // NVDM_STATUS_INCORRECT_CHECKSUM = -2, /**< The NVDM found a checksum error when reading the data item. */ + // NVDM_STATUS_ERROR = -1, /**< An unknown error occurred. */ + // NVDM_STATUS_OK = 0, /**< The operation was successful. */ + + switch (nvdm_status) + { + case NVDM_STATUS_OK: + err = CHIP_NO_ERROR; + break; + case NVDM_STATUS_ITEM_NOT_FOUND: + err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND; + break; + case NVDM_STATUS_INCORRECT_CHECKSUM: + err = CHIP_ERROR_INTEGRITY_CHECK_FAILED; + break; + case NVDM_STATUS_INSUFFICIENT_SPACE: + err = CHIP_ERROR_BUFFER_TOO_SMALL; + break; + case NVDM_STATUS_INVALID_PARAMETER: + err = CHIP_ERROR_INVALID_ARGUMENT; + break; + case NVDM_STATUS_ERROR: + err = CHIP_ERROR_INTERNAL; + break; + default: + err = CHIP_ERROR_INTERNAL; + break; + } + + return err; +} + +void MT793XConfig::RunConfigUnitTest() +{ + // Run common unit test. + ::chip::DeviceLayer::Internal::RunConfigUnitTest(); +} + +void MT793XConfig::OnExit() +{ + xSemaphoreGive(nvdm_sem); +} + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/MT793XConfig.h b/src/platform/mt793x/MT793XConfig.h new file mode 100644 index 00000000000000..8be61f7f2857d2 --- /dev/null +++ b/src/platform/mt793x/MT793XConfig.h @@ -0,0 +1,129 @@ +/* + * + * Copyright (c) 2020-2022 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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 + * Utilities for accessing persisted device configuration on + * platforms based on the MediaTek SDK. + */ + +#pragma once + +#include + +#include + +#include "nvdm.h" + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +/** + * + * This implementation uses the MT793X NVDM flash data storage library + * as the underlying storage layer. + * + * NOTE: This class is designed to be mixed-in to the concrete subclass of the + * GenericConfigurationManagerImpl<> template. When used this way, the class + * naturally provides implementations for the delegated members referenced by + * the template class (e.g. the ReadConfigValue() method). + */ + +class MT793XConfig +{ +public: +public: + typedef struct + { + const char * Namespace; + const char * Name; + } Key; + + // NVM3 key base offsets used by the CHIP Device Layer. + static constexpr char * kConfigNamespace_ChipFactory = (char *) "chip-factory"; + static constexpr char * kConfigNamespace_ChipConfig = (char *) "chip-config"; + static constexpr char * kConfigNamespace_ChipCounters = (char *) "chip-counters"; + + // Factory config keys + static const Key kConfigKey_SerialNum; + static const Key kConfigKey_UniqueId; + static const Key kConfigKey_MfrDeviceId; + static const Key kConfigKey_MfrDeviceCert; + static const Key kConfigKey_MfrDevicePrivateKey; + static const Key kConfigKey_ManufacturingDate; + static const Key kConfigKey_SetupPinCode; + static const Key kConfigKey_MfrDeviceICACerts; + static const Key kConfigKey_SetupDiscriminator; + static const Key kConfigKey_Spake2pIterationCount; + static const Key kConfigKey_Spake2pSalt; + static const Key kConfigKey_Spake2pVerifier; + + // CHIP Config Keys + static const Key kConfigKey_FabricId; + static const Key kConfigKey_ServiceConfig; + static const Key kConfigKey_PairedAccountId; + static const Key kConfigKey_ServiceId; + static const Key kConfigKey_FabricSecret; + static const Key kConfigKey_LastUsedEpochKeyId; + static const Key kConfigKey_FailSafeArmed; + static const Key kConfigKey_GroupKey; + static const Key kConfigKey_HardwareVersion; + static const Key kConfigKey_RegulatoryLocation; + static const Key kConfigKey_CountryCode; + static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_WiFiSSID; + static const Key kConfigKey_WiFiPSK; + static const Key kConfigKey_WiFiSEC; + static const Key kConfigKey_GroupKeyBase; + static const Key kConfigKey_GroupKeyMax; + + // CHIP Counter Keys + static const Key kConfigKey_BootCount; + static const Key kConfigKey_TotalOperationalHours; + + static CHIP_ERROR Init(void); + + // Configuration methods used by the GenericConfigurationManagerImpl<> template. + static CHIP_ERROR ReadConfigValue(Key key, bool & val); + static CHIP_ERROR ReadConfigValue(Key key, uint32_t & val); + static CHIP_ERROR ReadConfigValue(Key key, uint64_t & val); + static CHIP_ERROR ReadConfigValueStr(Key key, char * buf, size_t bufSize, size_t & outLen); + static CHIP_ERROR ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSize, size_t & outLen); + static CHIP_ERROR ReadConfigValueCounter(uint8_t counterIdx, uint32_t & val); + static CHIP_ERROR WriteConfigValue(Key key, bool val); + static CHIP_ERROR WriteConfigValue(Key key, uint32_t val); + static CHIP_ERROR WriteConfigValue(Key key, uint64_t val); + static CHIP_ERROR WriteConfigValueStr(Key key, const char * str); + static CHIP_ERROR WriteConfigValueStr(Key key, const char * str, size_t strLen); + static CHIP_ERROR WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen); + static CHIP_ERROR WriteConfigValueCounter(uint8_t counterIdx, uint32_t val); + static CHIP_ERROR ClearConfigValue(Key key); + static bool ConfigValueExists(Key key); + static CHIP_ERROR FactoryResetConfig(void); + + static void RunConfigUnitTest(void); + +private: + static CHIP_ERROR MapNvdmStatus(nvdm_status_t nvdm_status); + static void OnExit(void); +}; + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/MtkWiFiEvents.cpp b/src/platform/mt793x/MtkWiFiEvents.cpp new file mode 100644 index 00000000000000..1267597657b613 --- /dev/null +++ b/src/platform/mt793x/MtkWiFiEvents.cpp @@ -0,0 +1,9 @@ + + +#include + +#include + +#include + +using namespace ::chip::DeviceLayer; diff --git a/src/platform/mt793x/NetworkCommissioningWiFiDriver.cpp b/src/platform/mt793x/NetworkCommissioningWiFiDriver.cpp new file mode 100644 index 00000000000000..20579f9161f0f2 --- /dev/null +++ b/src/platform/mt793x/NetworkCommissioningWiFiDriver.cpp @@ -0,0 +1,379 @@ +/* + * + * Copyright (c) 2022 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. + */ + +#include +#include +#include +#include +#include + +#include + +using namespace ::chip; +using namespace ::chip::DeviceLayer::Internal; + +namespace chip { +namespace DeviceLayer { +namespace NetworkCommissioning { + +namespace { +NetworkCommissioning::WiFiScanResponse * sScanResult; +GenioScanResponseIterator mScanResponseIter(sScanResult); +} // namespace + +CHIP_ERROR GenioWiFiDriver::Init(NetworkStatusChangeCallback * networkStatusChangeCallback) +{ + CHIP_ERROR err; + size_t ssidLen = 0; + size_t credentialsLen = 0; + size_t outLen = 0; + mpScanCallback = nullptr; + mpConnectCallback = nullptr; + + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::Init"); + + // If reading fails, wifi is not provisioned, no need to go further. + err = MT793XConfig::ReadConfigValueStr(MT793XConfig::kConfigKey_WiFiSSID, mSavedNetwork.ssid, sizeof(mSavedNetwork.ssid), + ssidLen); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_NO_ERROR); + + err = MT793XConfig::ReadConfigValueStr(MT793XConfig::kConfigKey_WiFiPSK, mSavedNetwork.credentials, + sizeof(mSavedNetwork.credentials), credentialsLen); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_NO_ERROR); + + err = MT793XConfig::ReadConfigValueBin(MT793XConfig::kConfigKey_WiFiSEC, &mSavedNetwork.auth_mode, + sizeof(mSavedNetwork.auth_mode), outLen); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_NO_ERROR); + + mSavedNetwork.credentialsLen = credentialsLen; + mSavedNetwork.ssidLen = ssidLen; + mStagingNetwork = mSavedNetwork; + + ConnectWiFiNetwork(mSavedNetwork.ssid, ssidLen, mSavedNetwork.credentials, credentialsLen); + return err; +} + +CHIP_ERROR GenioWiFiDriver::CommitConfiguration() +{ + CHIP_ERROR err; + + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::CommitConfiguration"); + + ReturnErrorOnFailure(MT793XConfig::WriteConfigValueStr(MT793XConfig::kConfigKey_WiFiSSID, mStagingNetwork.ssid)); + + ReturnErrorOnFailure(MT793XConfig::WriteConfigValueStr(MT793XConfig::kConfigKey_WiFiPSK, mStagingNetwork.credentials)); + + ReturnErrorOnFailure(MT793XConfig::WriteConfigValueBin(MT793XConfig::kConfigKey_WiFiSEC, &mStagingNetwork.auth_mode, + sizeof(mStagingNetwork.auth_mode))); + + mSavedNetwork = mStagingNetwork; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR GenioWiFiDriver::RevertConfiguration() +{ + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::RevertConfiguration"); + + mStagingNetwork = mSavedNetwork; + return CHIP_NO_ERROR; +} + +bool GenioWiFiDriver::NetworkMatch(const WiFiNetwork & network, ByteSpan networkId) +{ + return networkId.size() == network.ssidLen && memcmp(networkId.data(), network.ssid, network.ssidLen) == 0; +} + +Status GenioWiFiDriver::AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outDebugText, + uint8_t & outNetworkIndex) +{ + outDebugText.reduce_size(0); + outNetworkIndex = 0; + + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::AddOrUpdateNetwork"); + + VerifyOrReturnError(mStagingNetwork.ssidLen == 0 || NetworkMatch(mStagingNetwork, ssid), Status::kBoundsExceeded); + VerifyOrReturnError(credentials.size() <= sizeof(mStagingNetwork.credentials), Status::kOutOfRange); + VerifyOrReturnError(ssid.size() <= sizeof(mStagingNetwork.ssid), Status::kOutOfRange); + + memset(mStagingNetwork.credentials, 0, sizeof(mStagingNetwork.credentials)); + memcpy(mStagingNetwork.credentials, credentials.data(), credentials.size()); + mStagingNetwork.credentialsLen = static_cast(credentials.size()); + + memset(mStagingNetwork.ssid, 0, sizeof(mStagingNetwork.ssid)); + memcpy(mStagingNetwork.ssid, ssid.data(), ssid.size()); + mStagingNetwork.ssidLen = static_cast(ssid.size()); + + mStagingNetwork.auth_mode = WIFI_AUTH_MODE_WPA2_PSK; + + return Status::kSuccess; +} + +Status GenioWiFiDriver::RemoveNetwork(ByteSpan networkId, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) +{ + outDebugText.reduce_size(0); + outNetworkIndex = 0; + + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::RemoveNetwork"); + + VerifyOrReturnError(NetworkMatch(mStagingNetwork, networkId), Status::kNetworkIDNotFound); + + // Use empty ssid for representing invalid network + mStagingNetwork.ssidLen = 0; + return Status::kSuccess; +} + +Status GenioWiFiDriver::ReorderNetwork(ByteSpan networkId, uint8_t index, MutableCharSpan & outDebugText) +{ + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::ReorderNetwork"); + + outDebugText.reduce_size(0); + // Only one network is supported for now + VerifyOrReturnError(index == 0, Status::kOutOfRange); + VerifyOrReturnError(NetworkMatch(mStagingNetwork, networkId), Status::kNetworkIDNotFound); + return Status::kSuccess; +} + +CHIP_ERROR GenioWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, const char * key, uint8_t keyLen) +{ + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::ConnectWiFiNetwork"); + + ReturnErrorOnFailure(ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Enabled)); + + // Set the wifi configuration + filogic_wifi_sta_prov_t wifi_prov = {}; + memcpy(wifi_prov.ssid, ssid, ssidLen); + memcpy(wifi_prov.psk, key, keyLen); + wifi_prov.ssid_len = ssidLen; + wifi_prov.psk_len = keyLen; + wifi_prov.auth_mode = WIFI_AUTH_MODE_WPA2_PSK; + + ChipLogProgress(NetworkProvisioning, "Setting up connection for WiFi SSID: %.*s", static_cast(ssidLen), ssid); + + void * filogicCtx = PlatformMgrImpl().mFilogicCtx; + + // Configure the FILOGIC WiFi interface. + filogic_wifi_sta_prov_set_sync(filogicCtx, &wifi_prov); + ReturnErrorOnFailure(ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Disabled)); + ReturnErrorOnFailure(ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Enabled)); + + return CHIP_NO_ERROR; +} + +void GenioWiFiDriver::OnConnectWiFiNetwork() +{ + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::OnConnectWiFiNetwork"); + + if (mpConnectCallback) + { + CommitConfiguration(); + mpConnectCallback->OnResult(Status::kSuccess, CharSpan(), 0); + mpConnectCallback = nullptr; + } +} + +void GenioWiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callback) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + Status networkingStatus = Status::kUnknownError; + + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::ConnectNetwork"); + + VerifyOrExit(NetworkMatch(mStagingNetwork, networkId), networkingStatus = Status::kNetworkIDNotFound); + VerifyOrExit(mpConnectCallback == nullptr, networkingStatus = Status::kUnknownError); + + err = ConnectWiFiNetwork(mStagingNetwork.ssid, mStagingNetwork.ssidLen, mStagingNetwork.credentials, + mStagingNetwork.credentialsLen); + if (err == CHIP_NO_ERROR) + { + mpConnectCallback = callback; + networkingStatus = Status::kSuccess; + } + +exit: + if (networkingStatus != Status::kSuccess) + { + ChipLogError(NetworkProvisioning, "Failed to connect to WiFi network:%s", chip::ErrorStr(err)); + mpConnectCallback = nullptr; + callback->OnResult(networkingStatus, CharSpan(), 0); + } +} + +chip::BitFlags GenioWiFiDriver::ConvertSecuritytype(wifi_auth_mode_t auth_mode) +{ + chip::BitFlags securityType; + if (auth_mode == WIFI_AUTH_MODE_OPEN) + { + securityType = WiFiSecurity::kUnencrypted; + } + else if (auth_mode == WIFI_AUTH_MODE_WPA_PSK) + { + securityType = WiFiSecurity::kWpaPersonal; + } + else if (auth_mode == WIFI_AUTH_MODE_WPA2_PSK) + { + securityType = WiFiSecurity::kWpa2Personal; + } + else if (auth_mode == WIFI_AUTH_MODE_WPA3_PSK) + { + securityType = WiFiSecurity::kWpa3Personal; + } + else + { + securityType = WiFiSecurity::kUnencrypted; + } + + return securityType; +} + +bool GenioWiFiDriver::StartScanWiFiNetworks(ByteSpan ssid) +{ + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::StartScanWiFiNetworks"); + + ChipLogProgress(DeviceLayer, "Start Scan WiFi Networks"); + + void * filogicCtx = PlatformMgrImpl().mFilogicCtx; + + if (!ssid.empty()) // ssid is given, only scan this network + { + char cSsid[DeviceLayer::Internal::kMaxWiFiSSIDLength] = {}; + memcpy(cSsid, ssid.data(), ssid.size()); + filogic_wifi_scan(filogicCtx, (uint8_t *) cSsid, ssid.size(), kMaxWiFiScanAPs, OnScanWiFiNetworkDone); + } + else // scan all networks + { + filogic_wifi_scan(filogicCtx, nullptr, 0, kMaxWiFiScanAPs, OnScanWiFiNetworkDone); + } + return true; +} + +void GenioWiFiDriver::OnScanWiFiNetworkDone(wifi_scan_list_item_t * aScanResult) +{ + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::OnScanWiFiNetworkDone"); + + ChipLogProgress(DeviceLayer, "OnScanWiFiNetworkDone"); + if (!aScanResult) + { + if (GetInstance().mpScanCallback != nullptr) + { + DeviceLayer::SystemLayer().ScheduleLambda([]() { + GetInstance().mpScanCallback->OnFinished(NetworkCommissioning::Status::kSuccess, CharSpan(), &mScanResponseIter); + GetInstance().mpScanCallback = nullptr; + }); + } + } + else + { + while (aScanResult->is_valid) + { + NetworkCommissioning::WiFiScanResponse scanResponse = {}; + chip::BitFlags security; + + security = GetInstance().ConvertSecuritytype(aScanResult->auth_mode); + + scanResponse.security.Set(security); + scanResponse.channel = aScanResult->channel; + scanResponse.rssi = aScanResult->rssi; + scanResponse.ssidLen = strnlen((char *) aScanResult->ssid, DeviceLayer::Internal::kMaxWiFiSSIDLength); + memcpy(scanResponse.ssid, aScanResult->ssid, scanResponse.ssidLen); + memcpy(scanResponse.bssid, aScanResult->bssid, sizeof(scanResponse.bssid)); + + mScanResponseIter.Add(&scanResponse); + + aScanResult++; // process next result + } + } +} + +void GenioWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * callback) +{ + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::ScanNetworks"); + + if (callback != nullptr) + { + mpScanCallback = callback; + if (!StartScanWiFiNetworks(ssid)) + { + ChipLogError(DeviceLayer, "ScanWiFiNetworks failed to start"); + mpScanCallback = nullptr; + callback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); + } + } +} + +CHIP_ERROR GetConnectedNetwork(Network & network) +{ + ChipLogProgress(NetworkProvisioning, "GetConnectedNetwork"); + + void * filogicCtx = PlatformMgrImpl().mFilogicCtx; + + filogic_wifi_sta_prov_t wifi_prov; + + if (!filogic_wifi_sta_get_link_status_sync(filogicCtx) || !filogic_wifi_sta_prov_get_sync(filogicCtx, &wifi_prov)) + { + return CHIP_ERROR_INCORRECT_STATE; + } + + uint8_t length = strnlen(wifi_prov.ssid, DeviceLayer::Internal::kMaxWiFiSSIDLength); + if (length > sizeof(network.networkID)) + { + ChipLogError(DeviceLayer, "SSID too long"); + return CHIP_ERROR_INTERNAL; + } + + memcpy(network.networkID, wifi_prov.ssid, length); + network.networkIDLen = length; + + return CHIP_NO_ERROR; +} + +size_t GenioWiFiDriver::WiFiNetworkIterator::Count() +{ + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::WiFiNetworkIterator::Count"); + + return mDriver->mStagingNetwork.ssidLen == 0 ? 0 : 1; +} + +bool GenioWiFiDriver::WiFiNetworkIterator::Next(Network & item) +{ + ChipLogProgress(NetworkProvisioning, "GenioWiFiDriver::WiFiNetworkIterator::Next"); + + if (mExhausted || mDriver->mStagingNetwork.ssidLen == 0) + { + return false; + } + memcpy(item.networkID, mDriver->mStagingNetwork.ssid, mDriver->mStagingNetwork.ssidLen); + item.networkIDLen = mDriver->mStagingNetwork.ssidLen; + item.connected = false; + mExhausted = true; + + Network connectedNetwork; + CHIP_ERROR err = GetConnectedNetwork(connectedNetwork); + if (err == CHIP_NO_ERROR) + { + if (connectedNetwork.networkIDLen == item.networkIDLen && + memcmp(connectedNetwork.networkID, item.networkID, item.networkIDLen) == 0) + { + item.connected = true; + } + } + return true; +} + +} // namespace NetworkCommissioning +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/NetworkCommissioningWiFiDriver.h b/src/platform/mt793x/NetworkCommissioningWiFiDriver.h new file mode 100644 index 00000000000000..d51f734fcffbfa --- /dev/null +++ b/src/platform/mt793x/NetworkCommissioningWiFiDriver.h @@ -0,0 +1,148 @@ +/* + * + * Copyright (c) 2022 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. + */ + +#pragma once +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +#include +#include + +namespace chip { +namespace DeviceLayer { +namespace NetworkCommissioning { + +namespace { +constexpr uint8_t kMaxWiFiNetworks = 1; +constexpr uint8_t kWiFiScanNetworksTimeOutSeconds = 10; +constexpr uint8_t kWiFiConnectNetworkTimeoutSeconds = 20; +constexpr uint8_t kMaxWiFiScanAPs = 30; +} // namespace + +template +class GenioScanResponseIterator : public Iterator +{ +public: + GenioScanResponseIterator(T * apScanResponse) : mpScanResponse(apScanResponse) {} + size_t Count() override { return itemCount; } + bool Next(T & item) override + { + if (mpScanResponse == nullptr || currentIterating >= itemCount) + { + return false; + } + item = mpScanResponse[currentIterating]; + currentIterating++; + return true; + } + void Release() override + { + itemCount = currentIterating = 0; + Platform::MemoryFree(mpScanResponse); + mpScanResponse = nullptr; + } + + void Add(T * pResponse) + { + size_t tempCount = itemCount + 1; + mpScanResponse = static_cast(Platform::MemoryRealloc(mpScanResponse, kItemSize * tempCount)); + if (mpScanResponse) + { + // first item at index. update after the copy. + memcpy(&(mpScanResponse[itemCount]), pResponse, kItemSize); + itemCount = tempCount; + } + } + +private: + size_t currentIterating = 0; + size_t itemCount = 0; + static constexpr size_t kItemSize = sizeof(T); + T * mpScanResponse; +}; + +class GenioWiFiDriver final : public WiFiDriver +{ +public: + class WiFiNetworkIterator final : public NetworkIterator + { + public: + WiFiNetworkIterator(GenioWiFiDriver * aDriver) : mDriver(aDriver) {} + size_t Count() override; + bool Next(Network & item) override; + void Release() override { delete this; } + ~WiFiNetworkIterator() = default; + + private: + GenioWiFiDriver * mDriver; + bool mExhausted = false; + }; + + struct WiFiNetwork + { + char ssid[DeviceLayer::Internal::kMaxWiFiSSIDLength]; + uint8_t ssidLen = 0; + char credentials[DeviceLayer::Internal::kMaxWiFiKeyLength]; + uint8_t credentialsLen = 0; + uint8_t auth_mode = 0; + }; + + // BaseDriver + NetworkIterator * GetNetworks() override { return new WiFiNetworkIterator(this); } + CHIP_ERROR Init(NetworkStatusChangeCallback * networkStatusChangeCallback) override; + + // WirelessDriver + uint8_t GetMaxNetworks() override { return kMaxWiFiNetworks; } + uint8_t GetScanNetworkTimeoutSeconds() override { return kWiFiScanNetworksTimeOutSeconds; } + uint8_t GetConnectNetworkTimeoutSeconds() override { return kWiFiConnectNetworkTimeoutSeconds; } + + CHIP_ERROR CommitConfiguration() override; + CHIP_ERROR RevertConfiguration() override; + + Status RemoveNetwork(ByteSpan networkId, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) override; + Status ReorderNetwork(ByteSpan networkId, uint8_t index, MutableCharSpan & outDebugText) override; + void ConnectNetwork(ByteSpan networkId, ConnectCallback * callback) override; + + // WiFiDriver + Status AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outDebugText, + uint8_t & outNetworkIndex) override; + void ScanNetworks(ByteSpan ssid, ScanCallback * callback) override; + + CHIP_ERROR ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, const char * key, uint8_t keyLen); + + chip::BitFlags ConvertSecuritytype(wifi_auth_mode_t auth_mode); + + void OnConnectWiFiNetwork(); + static GenioWiFiDriver & GetInstance() + { + static GenioWiFiDriver instance; + return instance; + } + +private: + bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); + bool StartScanWiFiNetworks(ByteSpan ssid); + static void OnScanWiFiNetworkDone(wifi_scan_list_item_t * aScanResult); + + WiFiNetwork mSavedNetwork = {}; + WiFiNetwork mStagingNetwork = {}; + ScanCallback * mpScanCallback; + ConnectCallback * mpConnectCallback; +}; + +} // namespace NetworkCommissioning +} // namespace DeviceLayer +} // namespace chip +#endif diff --git a/src/platform/mt793x/OTAImageProcessorImpl.cpp b/src/platform/mt793x/OTAImageProcessorImpl.cpp new file mode 100644 index 00000000000000..d3f2190b588e6d --- /dev/null +++ b/src/platform/mt793x/OTAImageProcessorImpl.cpp @@ -0,0 +1,236 @@ +/* + * + * Copyright (c) 2021 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 "OTAImageProcessorImpl.h" +#include + +extern "C" { +#include "platform/bootloader/api/btl_interface.h" +} + +/// No error, operation OK +#define SL_BOOTLOADER_OK 0L + +namespace chip { + +// Define static memebers +uint8_t OTAImageProcessorImpl::mSlotId; +uint32_t OTAImageProcessorImpl::mWriteOffset; + +CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() +{ + if (mParams.imageFile.empty()) + { + ChipLogError(SoftwareUpdate, "Invalid output image file supplied"); + return CHIP_ERROR_INTERNAL; + } + + DeviceLayer::PlatformMgr().ScheduleWork(HandlePrepareDownload, reinterpret_cast(this)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAImageProcessorImpl::Finalize() +{ + DeviceLayer::PlatformMgr().ScheduleWork(HandleFinalize, reinterpret_cast(this)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAImageProcessorImpl::Apply() +{ + uint32_t err = SL_BOOTLOADER_OK; + + ChipLogError(SoftwareUpdate, "OTAImageProcessorImpl::Apply()"); + + // Assuming that bootloader_verifyImage() call is not too expensive and + // doesn't need to be offloaded to a different task. Revisit if necessary. + err = bootloader_verifyImage(mSlotId, NULL); + if (err != SL_BOOTLOADER_OK) + { + ChipLogError(SoftwareUpdate, "bootloader_verifyImage error %ld", err); + return CHIP_ERROR_INTERNAL; + } + + err = bootloader_setImageToBootload(mSlotId); + if (err != SL_BOOTLOADER_OK) + { + ChipLogError(SoftwareUpdate, "setImageToBootload error %ld", err); + return CHIP_ERROR_INTERNAL; + } + + // This reboots the device + bootloader_rebootAndInstall(); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAImageProcessorImpl::Abort() +{ + if (mParams.imageFile.empty()) + { + ChipLogError(SoftwareUpdate, "Invalid output image file supplied"); + return CHIP_ERROR_INTERNAL; + } + + DeviceLayer::PlatformMgr().ScheduleWork(HandleAbort, reinterpret_cast(this)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAImageProcessorImpl::ProcessBlock(ByteSpan & block) +{ + if ((block.data() == nullptr) || block.empty()) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + // Store block data for HandleProcessBlock to access + CHIP_ERROR err = SetBlock(block); + if (err != CHIP_NO_ERROR) + { + ChipLogError(SoftwareUpdate, "Cannot set block data: %" CHIP_ERROR_FORMAT, err.Format()); + } + + DeviceLayer::PlatformMgr().ScheduleWork(HandleProcessBlock, reinterpret_cast(this)); + return CHIP_NO_ERROR; +} + +void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context) +{ + int32_t err = SL_BOOTLOADER_OK; + auto * imageProcessor = reinterpret_cast(context); + + if (imageProcessor == nullptr) + { + ChipLogError(SoftwareUpdate, "ImageProcessor context is null"); + return; + } + else if (imageProcessor->mDownloader == nullptr) + { + ChipLogError(SoftwareUpdate, "mDownloader is null"); + return; + } + + bootloader_init(); + mSlotId = 0; // Single slot until we support multiple images + mWriteOffset = 0; + + // Not calling bootloader_eraseStorageSlot(mSlotId) here because we erase during each write + + imageProcessor->mDownloader->OnPreparedForDownload(err == SL_BOOTLOADER_OK ? CHIP_NO_ERROR : CHIP_ERROR_INTERNAL); +} + +void OTAImageProcessorImpl::HandleFinalize(intptr_t context) +{ + auto * imageProcessor = reinterpret_cast(context); + if (imageProcessor == nullptr) + { + return; + } + + imageProcessor->ReleaseBlock(); + + ChipLogProgress(SoftwareUpdate, "OTA image downloaded to %s", imageProcessor->mParams.imageFile.data()); +} + +void OTAImageProcessorImpl::HandleAbort(intptr_t context) +{ + auto * imageProcessor = reinterpret_cast(context); + if (imageProcessor == nullptr) + { + return; + } + + // Not clearing the image storage area as it is done during each write + imageProcessor->ReleaseBlock(); +} + +void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context) +{ + uint32_t err = SL_BOOTLOADER_OK; + auto * imageProcessor = reinterpret_cast(context); + if (imageProcessor == nullptr) + { + ChipLogError(SoftwareUpdate, "ImageProcessor context is null"); + return; + } + else if (imageProcessor->mDownloader == nullptr) + { + ChipLogError(SoftwareUpdate, "mDownloader is null"); + return; + } + + // TODO: Process block header if any + + err = bootloader_eraseWriteStorage(mSlotId, mWriteOffset, reinterpret_cast(imageProcessor->mBlock.data()), + imageProcessor->mBlock.size()); + + if (err) + { + ChipLogError(SoftwareUpdate, "bootloader_eraseWriteStorage err %ld", err); + + imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED); + return; + } + + mWriteOffset += imageProcessor->mBlock.size(); // Keep our own track of how far we've written + imageProcessor->mParams.downloadedBytes += imageProcessor->mBlock.size(); + imageProcessor->mDownloader->FetchNextData(); +} + +// Store block data for HandleProcessBlock to access +CHIP_ERROR OTAImageProcessorImpl::SetBlock(ByteSpan & block) +{ + if ((block.data() == nullptr) || block.empty()) + { + return CHIP_NO_ERROR; + } + + // Allocate memory for block data if we don't have enough already + if (mBlock.size() < block.size()) + { + ReleaseBlock(); + + mBlock = MutableByteSpan(static_cast(chip::Platform::MemoryAlloc(block.size())), block.size()); + if (mBlock.data() == nullptr) + { + return CHIP_ERROR_NO_MEMORY; + } + } + + // Store the actual block data + CHIP_ERROR err = CopySpanToMutableSpan(block, mBlock); + if (err != CHIP_NO_ERROR) + { + ChipLogError(SoftwareUpdate, "Cannot copy block data: %" CHIP_ERROR_FORMAT, err.Format()); + return err; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAImageProcessorImpl::ReleaseBlock() +{ + if (mBlock.data() != nullptr) + { + chip::Platform::MemoryFree(mBlock.data()); + } + + mBlock = MutableByteSpan(); + return CHIP_NO_ERROR; +} + +} // namespace chip diff --git a/src/platform/mt793x/OTAImageProcessorImpl.h b/src/platform/mt793x/OTAImageProcessorImpl.h new file mode 100644 index 00000000000000..662b8607d4f0ca --- /dev/null +++ b/src/platform/mt793x/OTAImageProcessorImpl.h @@ -0,0 +1,62 @@ +/* + * + * Copyright (c) 2021 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 + +#include +#include +#include + +namespace chip { + +class OTAImageProcessorImpl : public OTAImageProcessorInterface +{ +public: + //////////// OTAImageProcessorInterface Implementation /////////////// + CHIP_ERROR PrepareDownload() override; + CHIP_ERROR Finalize() override; + CHIP_ERROR Apply() override; + CHIP_ERROR Abort() override; + CHIP_ERROR ProcessBlock(ByteSpan & block) override; + + void SetOTADownloader(OTADownloader * downloader) { mDownloader = downloader; } + +private: + //////////// Actual handlers for the OTAImageProcessorInterface /////////////// + static void HandlePrepareDownload(intptr_t context); + static void HandleFinalize(intptr_t context); + static void HandleAbort(intptr_t context); + static void HandleProcessBlock(intptr_t context); + + /** + * Called to allocate memory for mBlock if necessary and set it to block + */ + CHIP_ERROR SetBlock(ByteSpan & block); + + /** + * Called to release allocated memory for mBlock + */ + CHIP_ERROR ReleaseBlock(); + + static uint32_t mWriteOffset; // End of last written block + static uint8_t mSlotId; // Bootloader storage slot + MutableByteSpan mBlock; + OTADownloader * mDownloader; +}; + +} // namespace chip diff --git a/src/platform/mt793x/PlatformManagerImpl.cpp b/src/platform/mt793x/PlatformManagerImpl.cpp new file mode 100644 index 00000000000000..2d4006a48122e1 --- /dev/null +++ b/src/platform/mt793x/PlatformManagerImpl.cpp @@ -0,0 +1,135 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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 of the PlatformManager object + * for MT793x platforms using the MT793x SDK. + */ +/* this file behaves like a config.h, comes first */ +#include + +#include +#include +#include + +#include +#include + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +#include "wifi_api_ex.h" +#endif + +extern "C" void PlatformLogPrint(int module, int level, const char * msg, va_list args) +{ + char log[256]; + int i; + + i = vsnprintf(log, sizeof(log), msg, args); + while ((--i) >= 0) + { + if (log[i] == '\n' || log[i] == '\r' || log[i] == ' ') + { + log[i] = '\0'; + continue; + } + break; + } + ChipLogError(DeviceLayer, "[%lu] FILOGIC %s", xTaskGetTickCount(), log); +} + +namespace chip { +namespace DeviceLayer { + +PlatformManagerImpl PlatformManagerImpl::sInstance; + +CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) +{ + CHIP_ERROR err; + + // Initialize the configuration system. + err = Internal::MT793XConfig::Init(); + SuccessOrExit(err); + SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); + SetDiagnosticDataProvider(&DiagnosticDataProviderImpl::GetDefaultInstance()); + + mFilogicCtx = filogic_start_sync(); + assert(mFilogicCtx != NULL); + + assert(filogic_set_logv_callback_sync(mFilogicCtx, PlatformLogPrint)); + + filogic_set_event_callback_sync(mFilogicCtx, FilogicEventHandler); + + // Initialize LwIP. + mtk_tcpip_init(NULL, NULL); + + // Call _InitChipStack() on the generic implementation base class + // to finish the initialization process. + err = Internal::GenericPlatformManagerImpl_FreeRTOS::_InitChipStack(); + SuccessOrExit(err); + +exit: + return err; +} + +void PlatformManagerImpl::_Shutdown() +{ + uint64_t upTime = 0; + + if (GetDiagnosticDataProvider().GetUpTime(upTime) == CHIP_NO_ERROR) + { + uint32_t totalOperationalHours = 0; + + if (ConfigurationMgr().GetTotalOperationalHours(totalOperationalHours) == CHIP_NO_ERROR) + { + ConfigurationMgr().StoreTotalOperationalHours(totalOperationalHours + static_cast(upTime / 3600)); + } + else + { + ChipLogError(DeviceLayer, "Failed to get total operational hours of the Node"); + } + } + else + { + ChipLogError(DeviceLayer, "Failed to get current uptime since the Node’s last reboot"); + } + + Internal::GenericPlatformManagerImpl_FreeRTOS::_Shutdown(); +} + +void PlatformManagerImpl::FilogicEventHandler(void * c, filogic_async_event_id_t event, filogic_async_event_data * data) +{ + ChipDeviceEvent e = { 0 }; + + ChipLogProgress(DeviceLayer, "%s %s", __func__, filogic_event_to_name(event)); + + if (event < FILOGIC_EVENT_ID_MAX) + { + e.Type = DeviceEventType::kMtkWiFiEvent; + memcpy(&e.Platform.MtkWiFiEvent.event_data, data, sizeof(*data)); + ChipLogError(DeviceLayer, "event %s", filogic_event_to_name(event)); + (void) sInstance.PostEvent(&e); + } + else + { + ChipLogError(DeviceLayer, "Unhandled event %d", event); + } +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/PlatformManagerImpl.h b/src/platform/mt793x/PlatformManagerImpl.h new file mode 100644 index 00000000000000..6846777dad5d8b --- /dev/null +++ b/src/platform/mt793x/PlatformManagerImpl.h @@ -0,0 +1,104 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * 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 of the PlatformManager object + * for Genio platforms using the MediaTek SDK. + */ + +#pragma once + +#include +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +#include "wifi_api_ex.h" +#endif + +#include "filogic.h" + +namespace chip { +namespace DeviceLayer { + +/** + * Concrete implementation of the PlatformManager singleton object for the Genio platform. + */ +class PlatformManagerImpl final : public PlatformManager, public Internal::GenericPlatformManagerImpl_FreeRTOS +{ + // Allow the PlatformManager interface class to delegate method calls to + // the implementation methods provided by this class. + friend PlatformManager; + + // Allow the generic implementation base class to call helper methods on + // this class. +#ifndef DOXYGEN_SHOULD_SKIP_THIS + friend Internal::GenericPlatformManagerImpl_FreeRTOS; +#endif + +public: + // ===== Platform-specific members that may be accessed directly by the application. + static void FilogicEventHandler(void * c, filogic_async_event_id_t event, filogic_async_event_data * data); + + System::Clock::Timestamp GetStartTime() { return mStartTime; } + + void * mFilogicCtx; + +private: + // ===== Methods that implement the PlatformManager abstract interface. + + CHIP_ERROR _InitChipStack(void); + void _Shutdown(void); + + // ===== Members for internal use by the following friends. + + friend PlatformManager & PlatformMgr(void); + friend PlatformManagerImpl & PlatformMgrImpl(void); + friend class Internal::BLEManagerImpl; + friend class ConnectivityManagerImpl; + + System::Clock::Timestamp mStartTime = System::Clock::kZero; + + static PlatformManagerImpl sInstance; + + using Internal::GenericPlatformManagerImpl_FreeRTOS::PostEventFromISR; +}; + +/** + * Returns the public interface of the PlatformManager singleton object. + * + * Chip applications should use this to access features of the PlatformManager object + * that are common to all platforms. + */ +inline PlatformManager & PlatformMgr(void) +{ + return PlatformManagerImpl::sInstance; +} + +/** + * Returns the platform-specific implementation of the PlatformManager + * singleton object. + * + * Chip applications can use this to gain access to features of the + * PlatformManager that are specific to the MT793x platform. + */ +inline PlatformManagerImpl & PlatformMgrImpl(void) +{ + return PlatformManagerImpl::sInstance; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/mt793x/SystemPlatformConfig.h b/src/platform/mt793x/SystemPlatformConfig.h new file mode 100644 index 00000000000000..2cca1502974671 --- /dev/null +++ b/src/platform/mt793x/SystemPlatformConfig.h @@ -0,0 +1,53 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * + * 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 + * Platform-specific configuration overrides for the CHIP System + * Layer on MediaTek Genio Platforms. + * + */ + +#pragma once + +#include + +namespace chip { +namespace DeviceLayer { +struct ChipDeviceEvent; +} // namespace DeviceLayer +} // namespace chip + +// ==================== Platform Adaptations ==================== +#define CHIP_SYSTEM_CONFIG_PLATFORM_PROVIDES_TIME 1 +#define CHIP_SYSTEM_CONFIG_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent * + +// ========== Platform-specific Configuration Overrides ========= + +#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS +#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 +#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS + +#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 + +/* + * Overrides CHIP_SYSTEM_HEADER_RESERVE_SIZE in SystemConfig.h + * + * Note: hard to include header files needed for NIC_TX_HEAD_ROOM (62) + */ +#define CHIP_SYSTEM_HEADER_RESERVE_SIZE (62 + CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE) diff --git a/src/platform/mt793x/SystemTimeSupport.cpp b/src/platform/mt793x/SystemTimeSupport.cpp new file mode 100644 index 00000000000000..8f630a3bbebd3a --- /dev/null +++ b/src/platform/mt793x/SystemTimeSupport.cpp @@ -0,0 +1,122 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2018 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 implementations of the CHIP System Layer platform + * time/clock functions that are suitable for use on the Genio platform. + */ +/* this file behaves like a config.h, comes first */ +#include + +#include +#include + +namespace chip { +namespace System { +namespace Clock { + +namespace Internal { +ClockImpl gClockImpl; +} // namespace Internal + +Microseconds64 ClockImpl::GetMonotonicMicroseconds64(void) +{ + return static_cast(0); +} + +Milliseconds64 ClockImpl::GetMonotonicMilliseconds64(void) +{ + return std::chrono::duration_cast(GetMonotonicMicroseconds64()); +} + +CHIP_ERROR ClockImpl::GetClock_RealTime(Clock::Microseconds64 & aCurTime) +{ + struct timeval tv; + if (gettimeofday(&tv, nullptr) != 0) + { + return CHIP_ERROR_POSIX(errno); + } + if (tv.tv_sec < CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD) + { + return CHIP_ERROR_REAL_TIME_NOT_SYNCED; + } + if (tv.tv_usec < 0) + { + return CHIP_ERROR_REAL_TIME_NOT_SYNCED; + } + static_assert(CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD >= 0, "We might be letting through negative tv_sec values!"); + aCurTime = Clock::Microseconds64((static_cast(tv.tv_sec) * UINT64_C(1000000)) + static_cast(tv.tv_usec)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ClockImpl::GetClock_RealTimeMS(Clock::Milliseconds64 & aCurTime) +{ + struct timeval tv; + if (gettimeofday(&tv, nullptr) != 0) + { + return CHIP_ERROR_POSIX(errno); + } + if (tv.tv_sec < CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD) + { + return CHIP_ERROR_REAL_TIME_NOT_SYNCED; + } + if (tv.tv_usec < 0) + { + return CHIP_ERROR_REAL_TIME_NOT_SYNCED; + } + static_assert(CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD >= 0, "We might be letting through negative tv_sec values!"); + aCurTime = + Clock::Milliseconds64((static_cast(tv.tv_sec) * UINT64_C(1000)) + (static_cast(tv.tv_usec) / 1000)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ClockImpl::SetClock_RealTime(Clock::Microseconds64 aNewCurTime) +{ + struct timeval tv; + tv.tv_sec = static_cast(aNewCurTime.count() / UINT64_C(1000000)); + tv.tv_usec = static_cast(aNewCurTime.count() % UINT64_C(1000000)); +// if (settimeofday(&tv, nullptr) != 0) +// { +// return (errno == EPERM) ? CHIP_ERROR_ACCESS_DENIED : CHIP_ERROR_POSIX(errno); +// } +#if CHIP_PROGRESS_LOGGING + { + const time_t timep = tv.tv_sec; + struct tm calendar; + localtime_r(&timep, &calendar); + ChipLogProgress(DeviceLayer, "Real time clock set to %lld (%04d/%02d/%02d %02d:%02d:%02d UTC)", tv.tv_sec, calendar.tm_year, + calendar.tm_mon, calendar.tm_mday, calendar.tm_hour, calendar.tm_min, calendar.tm_sec); + } +#endif // CHIP_PROGRESS_LOGGING + return CHIP_NO_ERROR; +} + +CHIP_ERROR InitClock_RealTime() +{ + Clock::Microseconds64 curTime = + Clock::Microseconds64((static_cast(CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD) * UINT64_C(1000000))); + // Use CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD as the initial value of RealTime. + // Then the RealTime obtained from GetClock_RealTime will be always valid. + return System::SystemClock().SetClock_RealTime(curTime); +} + +} // namespace Clock +} // namespace System +} // namespace chip diff --git a/src/platform/mt793x/SystemTimeSupport.h b/src/platform/mt793x/SystemTimeSupport.h new file mode 100644 index 00000000000000..da38a26ced25c2 --- /dev/null +++ b/src/platform/mt793x/SystemTimeSupport.h @@ -0,0 +1,28 @@ +/* + * + * Copyright (c) 2022 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. + */ + +#include + +namespace chip { +namespace System { +namespace Clock { + +CHIP_ERROR InitClock_RealTime(); + +} // namespace Clock +} // namespace System +} // namespace chip diff --git a/src/platform/mt793x/WarmPlatformConfig.h b/src/platform/mt793x/WarmPlatformConfig.h new file mode 100644 index 00000000000000..c6542a21e778c5 --- /dev/null +++ b/src/platform/mt793x/WarmPlatformConfig.h @@ -0,0 +1,39 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * + * 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 + * Platform-specific configuration overrides for the Chip + * Addressing and Routing Module (WARM) on Genio platforms + * using the MediaTek SDK. + * + */ + +#pragma once + +// ==================== Platform Adaptations ==================== + +#define WARM_CONFIG_SUPPORT_THREAD 1 +#define WARM_CONFIG_SUPPORT_THREAD_ROUTING 0 +#define WARM_CONFIG_SUPPORT_LEGACY6LOWPAN_NETWORK 0 +#define WARM_CONFIG_SUPPORT_WIFI 0 +#define WARM_CONFIG_SUPPORT_CELLULAR 0 + +// ========== Platform-specific Configuration Overrides ========= + +/* none so far */ diff --git a/src/platform/mt793x/args.gni b/src/platform/mt793x/args.gni new file mode 100644 index 00000000000000..d59406736774ae --- /dev/null +++ b/src/platform/mt793x/args.gni @@ -0,0 +1,48 @@ +# 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("//build_overrides/mt793x_sdk.gni") +import("//build_overrides/pigweed.gni") + +import("${chip_root}/examples/platform/mt793x/args.gni") + +# ARM architecture flags will be set based on mt793x_family. +arm_platform_config = "${mt793x_sdk_build_root}/mt793x_arm.gni" + +mbedtls_target = "${mt793x_sdk_build_root}:mt793x_sdk" + +chip_device_platform = "mt793x" + +# Network configuration + +lwip_platform = "mt793x" + +# Use our porting instad of //third_party/lwip + +lwip_root = "${chip_root}/third_party/mt793x_sdk/lwip" + +chip_mdns = "platform" +chip_inet_config_enable_ipv4 = false + +chip_build_libshell = true + +chip_build_tests = false + +chip_config_memory_management = "platform" + +pw_build_LINK_DEPS = [ + "$dir_pw_assert:impl", + "$dir_pw_log:impl", +] diff --git a/src/platform/mt793x/freertos_bluetooth.h b/src/platform/mt793x/freertos_bluetooth.h new file mode 100644 index 00000000000000..862b71550ec9f8 --- /dev/null +++ b/src/platform/mt793x/freertos_bluetooth.h @@ -0,0 +1,84 @@ +/* + * + * 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. + */ + +#pragma once + +#if __cplusplus +extern "C" { +#endif + +#include "FreeRTOS.h" +#include "event_groups.h" +#include "semphr.h" +#include "task.h" +#include "timers.h" + +#include "sl_bt_api.h" + +#define BLE_STACK_TASK_NAME "BLE_STACK" +#define BLE_LINK_TASK_NAME "BLE_LINK" + +// Bluetooth event flag group +extern EventGroupHandle_t bluetooth_event_flags; +// Bluetooth event flag definitions +#define BLUETOOTH_EVENT_FLAG_STACK (0x01u) // Bluetooth task needs an update +#define BLUETOOTH_EVENT_FLAG_LL (0x02u) // Linklayer task needs an update +#define BLUETOOTH_EVENT_FLAG_CMD_WAITING (0x04u) // BGAPI command is waiting to be processed +#define BLUETOOTH_EVENT_FLAG_RSP_WAITING (0x08u) // BGAPI response is waiting to be processed +#define BLUETOOTH_EVENT_FLAG_EVT_WAITING (0x10u) // BGAPI event is waiting to be processed +#define BLUETOOTH_EVENT_FLAG_EVT_HANDLED (0x20u) // BGAPI event is handled + +// Bluetooth event data pointer +extern volatile sl_bt_msg_t * bluetooth_evt; + +// Function prototype for initializing Bluetooth stack. +typedef sl_status_t (*bluetooth_stack_init_func)(); + +/** + * Start Bluetooth tasks. The given Bluetooth stack initialization function + * will be called at a proper time. Application should not initialize + * Bluetooth stack anywhere else. + * + * @param ll_priority link layer task priority + * @param stack_priority Bluetooth stack task priority + * @param initialize_bluetooth_stack The function for initializing Bluetooth stack + */ +sl_status_t bluetooth_start(UBaseType_t ll_priority, UBaseType_t stack_priority, + bluetooth_stack_init_func initialize_bluetooth_stack); + +// Set the callback for wakeup, Bluetooth task will call this when it has a new event +// It must only used to wake up application task, for example by posting task semaphore +typedef void (*wakeupCallback)(void); +void BluetoothSetWakeupCallback(wakeupCallback cb); +// Bluetooth stack needs an update +extern void BluetoothUpdate(void); +// Linklayer is updated +extern void BluetoothLLCallback(void); + +// Mutex functions for using Bluetooth from multiple tasks +void BluetoothPend(void); +void BluetoothPost(void); + +void vRaiseEventFlagBasedOnContext(EventGroupHandle_t xEventGroup, EventBits_t uxBitsToWaitFor); +BaseType_t vSendToQueueBasedOnContext(QueueHandle_t xQueue, void * xItemToQueue, TickType_t xTicksToWait, + BaseType_t * pxHigherPriorityTaskWoken); + +#if __cplusplus +} +#endif diff --git a/src/platform/mt793x/gatt.xml b/src/platform/mt793x/gatt.xml new file mode 100644 index 00000000000000..b346d14bdbeab9 --- /dev/null +++ b/src/platform/mt793x/gatt.xml @@ -0,0 +1,106 @@ + + + + + + + + + Abstract: The generic_access service contains generic information about the device. All available Characteristics are readonly. + + + + + Empty Example + + + + + + + + + Abstract: The external appearance of this device. The values are composed of a category (10-bits) and sub-categories (6-bits). + 0000 + + + + + + + + + Abstract: The Device Information Service exposes manufacturer and/or vendor information about a device. Summary: This service exposes manufacturer information about a device. The Device Information Service is instantiated as a Primary Service. Only one instance of the Device Information Service is exposed on a device. + + + + Abstract: The value of this characteristic is a UTF-8 string representing the name of the manufacturer of the device. + MediaTek + + + + + + + + Abstract: The value of this characteristic is a UTF-8 string representing the model number assigned by the device vendor. + Blue Gecko + + + + + + + + Abstract: The SYSTEM ID characteristic consists of a structure with two fields. The first field are the LSOs and the second field contains the MSOs. This is a 64-bit structure which consists of a 40-bit manufacturer-defined identifier concatenated with a 24 bit unique Organizationally Unique Identifier (OUI). The OUI is issued by the IEEE Registration Authority (http://standards.ieee.org/regauth/index.html) and is required to be used in accordance with IEEE Standard 802-2001.6 while the least significant 40 bits are manufacturer defined. If System ID generated based on a Bluetooth Device Address, it is required to be done as follows. System ID and the Bluetooth Device Address have a very similar structure: a Bluetooth Device Address is 48 bits in length and consists of a 24 bit Company Assigned Identifier (manufacturer defined identifier) concatenated with a 24 bit Company Identifier (OUI). In order to encapsulate a Bluetooth Device Address as System ID, the Company Identifier is concatenated with 0xFFFE followed by the Company Assigned Identifier of the Bluetooth Address. For more guidelines related to EUI-64, refer to http://standards.ieee.org/develop/regauth/tut/eui64.pdf. Examples: If the system ID is based of a Bluetooth Device Address with a Company Identifier (OUI) is 0x123456 and the Company Assigned Identifier is 0x9ABCDE, then the System Identifier is required to be 0x123456FFFE9ABCDE. + 000102030405 + + + + + + + + + Custom service + + + + Custom characteristic + 00 + + + + + + + + + Custom characteristic + 00 + + + + + + + + + + diff --git a/src/platform/mt793x/gatt_db.c b/src/platform/mt793x/gatt_db.c new file mode 100644 index 00000000000000..ea8c55764a6824 --- /dev/null +++ b/src/platform/mt793x/gatt_db.c @@ -0,0 +1,23 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * + * 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. + */ + +/******************************************************************** + * Autogenerated file, do not edit. + *******************************************************************/ + +#include diff --git a/src/platform/mt793x/gatt_db.h b/src/platform/mt793x/gatt_db.h new file mode 100644 index 00000000000000..7eab6135d0a33c --- /dev/null +++ b/src/platform/mt793x/gatt_db.h @@ -0,0 +1,46 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * + * 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. + */ + +/******************************************************************** + * Autogenerated file, do not edit. + *******************************************************************/ + +#ifndef __GATT_DB_H +#define __GATT_DB_H + +#if __cplusplus +extern "C" { +#endif + +//#include "sli_bt_gattdb_def.h" + +// extern const sli_bt_gattdb_t gattdb; + +#define gattdb_service_changed_char 3 +#define gattdb_database_hash 6 +#define gattdb_client_support_features 8 +#define gattdb_device_name 11 +#define gattdb_CHIPoBLEChar_Rx 23 +#define gattdb_CHIPoBLEChar_Tx 25 +#define gattdb_ota_control 29 + +#if __cplusplus +} +#endif + +#endif // __GATT_DB_H diff --git a/src/platform/mt793x/lwip/BUILD.gn b/src/platform/mt793x/lwip/BUILD.gn new file mode 100644 index 00000000000000..55c170c2f9efaa --- /dev/null +++ b/src/platform/mt793x/lwip/BUILD.gn @@ -0,0 +1,67 @@ +# 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") +import("//build_overrides/chip.gni") +import("${chip_root}/src/platform/mt793x/lwip/lwip.gni") + +import("${chip_root}/build/chip/buildconfig_header.gni") +import("${chip_root}/src/lwip/lwip.gni") +import("${lwip_root}/lwip.gni") + +assert(chip_with_lwip) + +assert(lwip_platform == "external", + "Unsupported lwIP platform: ${lwip_platform}") + +declare_args() { + # Enable lwIP debugging. + lwip_debug = is_debug +} + +import("//build_overrides/mt793x_sdk.gni") +import("${mt793x_sdk_build_root}/mt793x_sdk.gni") + +#buildconfig_header("lwip_buildconfig") { +# header = "lwip_buildconfig.h" +# header_dir = "lwip" +# +# defines = [ "HAVE_LWIP_UDP_BIND_NETIF=1" ] +# if (lwip_platform != "external") { +# if (current_os == "android") { +# defines += [ "LWIP_NO_STDINT_H=1" ] +# } +# } +#} + +config("lwip_config") { + include_dirs = [ + "${mt793x_sdk_root}/project/mt7933_hdk/apps/${mt793x_project_name}/inc", + ] +} + +lwip_target("lwip") { + public = [ "${mt793x_sdk_root}/project/mt7933_hdk/apps/${mt793x_project_name}/inc/lwipopts.h" ] + + sources = [] + + public_deps = [ ":lwip_buildconfig" ] + + public_deps += [ "${mt793x_sdk_build_root}:mt793x_sdk" ] + + public_configs = [ + ":lwip_config", + "${chip_root}/src:includes", + ] +} diff --git a/src/platform/mt793x/lwip/lwip.gni b/src/platform/mt793x/lwip/lwip.gni new file mode 100644 index 00000000000000..a7ab9fefef1a4c --- /dev/null +++ b/src/platform/mt793x/lwip/lwip.gni @@ -0,0 +1,19 @@ +# 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") +import("//build_overrides/chip.gni") + +lwip_remove_configs = [ "${build_root}/config/compiler:warnings_default" ] +lwip_add_configs = [ "${build_root}/config/compiler:warnings_third_party" ] diff --git a/src/platform/mt793x/mt793x-mbedtls-config.h b/src/platform/mt793x/mt793x-mbedtls-config.h new file mode 100644 index 00000000000000..b37edfcdfbb135 --- /dev/null +++ b/src/platform/mt793x/mt793x-mbedtls-config.h @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2020, The OpenThread Authors. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#pragma once + +#include +#include +#include + +#ifdef MT793X_PORTING +#include "em_device.h" +#include "em_se.h" +#endif + +/** + * Enable H Crypto and Entropy modules + */ +#define MBEDTLS_AES_C +#define MBEDTLS_ECP_C +#define MBEDTLS_ECDH_C +#define MBEDTLS_ENTROPY_C +#define MBEDTLS_SHA256_C +#define MBEDTLS_TRNG_C + +#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf + +#define MBEDTLS_AES_ROM_TABLES +#define MBEDTLS_ASN1_PARSE_C +#define MBEDTLS_ASN1_WRITE_C +#define MBEDTLS_BASE64_C +#define MBEDTLS_BIGNUM_C +#define MBEDTLS_CCM_C +#define MBEDTLS_CIPHER_C +#define MBEDTLS_CMAC_C +#define MBEDTLS_CTR_DRBG_C +#define MBEDTLS_ECDH_LEGACY_CONTEXT +#define MBEDTLS_ECDSA_C +#define MBEDTLS_ECDSA_DETERMINISTIC +#define MBEDTLS_ECJPAKE_C +#define MBEDTLS_ECP_DP_SECP256R1_ENABLED +#define MBEDTLS_ECP_NIST_OPTIM +#define MBEDTLS_ENTROPY_FORCE_SHA256 +#define MBEDTLS_ENTROPY_HARDWARE_ALT +#define MBEDTLS_ERROR_STRERROR_DUMMY +#define MBEDTLS_HAVE_ASM +#define MBEDTLS_HKDF_C +#define MBEDTLS_HMAC_DRBG_C +#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED +#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED +#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED +#define MBEDTLS_MD_C +#define MBEDTLS_NO_PLATFORM_ENTROPY +#define MBEDTLS_OID_C +#define MBEDTLS_PEM_PARSE_C +#define MBEDTLS_PEM_WRITE_C +#define MBEDTLS_PK_C +#define MBEDTLS_PK_PARSE_C +#define MBEDTLS_PK_WRITE_C +#define MBEDTLS_PKCS5_C +#define MBEDTLS_PLATFORM_C +#define MBEDTLS_PLATFORM_MEMORY +#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS +#define MBEDTLS_PSA_CRYPTO_C +#define MBEDTLS_PSA_CRYPTO_CONFIG +#define MBEDTLS_PSA_CRYPTO_DRIVERS +//#define MBEDTLS_PSA_CRYPTO_STORAGE_C +#define MBEDTLS_SHA256_SMALLER +#define MBEDTLS_SHA512_C +#define MBEDTLS_SSL_CLI_C +#define MBEDTLS_SSL_COOKIE_C +#define MBEDTLS_SSL_DTLS_ANTI_REPLAY +#define MBEDTLS_SSL_DTLS_HELLO_VERIFY +#define MBEDTLS_SSL_EXPORT_KEYS +#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE +#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH +#define MBEDTLS_SSL_PROTO_TLS1_2 +#define MBEDTLS_SSL_PROTO_DTLS +#define MBEDTLS_SSL_SRV_C +#define MBEDTLS_SSL_TLS_C +#define MBEDTLS_X509_CREATE_C +#define MBEDTLS_X509_CSR_WRITE_C +#define MBEDTLS_X509_CRL_PARSE_C +#define MBEDTLS_X509_CRT_PARSE_C +#define MBEDTLS_X509_CSR_PARSE_C +#define MBEDTLS_X509_USE_C + +#define MBEDTLS_MPI_WINDOW_SIZE 1 /**< Maximum windows size used. */ +#define MBEDTLS_MPI_MAX_SIZE 32 /**< Maximum number of bytes for usable MPIs. */ +#define MBEDTLS_ECP_MAX_BITS 256 /**< Maximum bit size of groups */ +#define MBEDTLS_ECP_WINDOW_SIZE 2 /**< Maximum window size used */ +#define MBEDTLS_ECP_FIXED_POINT_OPTIM 0 /**< Enable fixed-point speed-up */ +#define MBEDTLS_ENTROPY_MAX_SOURCES 2 /**< Maximum number of sources supported */ + +#if OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE +#define MBEDTLS_SSL_MAX_CONTENT_LEN 900 /**< Maxium fragment length in bytes */ +#else +#define MBEDTLS_SSL_MAX_CONTENT_LEN 768 /**< Maxium fragment length in bytes */ +#endif + +#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 + +#define MBEDTLS_CIPHER_MODE_WITH_PADDING + +#ifdef MT793X_PORTING +#include "check_crypto_config.h" +#include "config-device-acceleration.h" +#include "mbedtls/check_config.h" +#include "mbedtls/config_psa.h" +#endif diff --git a/src/protocols/BUILD.gn b/src/protocols/BUILD.gn index 463f941e6b8c8e..ed5b9dd94e3cd9 100644 --- a/src/protocols/BUILD.gn +++ b/src/protocols/BUILD.gn @@ -18,6 +18,7 @@ static_library("protocols") { output_name = "libChipProtocols" sources = [ + "Protocols.cpp", "echo/Echo.h", "echo/EchoClient.cpp", "echo/EchoServer.cpp", diff --git a/src/protocols/Protocols.cpp b/src/protocols/Protocols.cpp new file mode 100644 index 00000000000000..a4ad43013fb5e6 --- /dev/null +++ b/src/protocols/Protocols.cpp @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2022 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 +#include +#include +#include + +namespace chip { +namespace Protocols { + +static const char * sUnknownTypeName = "----"; + +static const char * LookupMessageTypeName(const MessageTypeNameLookup * lookupTable, size_t tableSize, uint8_t msgType) +{ + for (auto ptr = lookupTable; ptr != (lookupTable + tableSize); ptr++) + { + if (ptr->mId == msgType) + { + return ptr->mName; + } + } + + return sUnknownTypeName; +} + +const char * GetProtocolName(Id protocolId) +{ + if (protocolId.GetVendorId() != VendorId::Common) + { + return sUnknownTypeName; + } + + switch (protocolId.GetProtocolId()) + { + case InteractionModel::Id.GetProtocolId(): + return InteractionModel::kProtocolName; + break; + + case SecureChannel::Id.GetProtocolId(): + return SecureChannel::kProtocolName; + break; + + case BDX::Id.GetProtocolId(): + return bdx::kProtocolName; + break; + + case Echo::Id.GetProtocolId(): + return Echo::kProtocolName; + break; + + case UserDirectedCommissioning::Id.GetProtocolId(): + return UserDirectedCommissioning::kProtocolName; + break; + + default: + return sUnknownTypeName; + } +} + +const char * GetMessageTypeName(Id protocolId, uint8_t msgType) +{ + if (protocolId.GetVendorId() != VendorId::Common) + { + return sUnknownTypeName; + } + + const MessageTypeNameLookup * lookupTable = nullptr; + size_t lookupTableSize = 0; + + switch (protocolId.GetProtocolId()) + { + case InteractionModel::Id.GetProtocolId(): + lookupTable = MessageTypeTraits::GetTypeToNameTable()->begin(); + lookupTableSize = MessageTypeTraits::GetTypeToNameTable()->size(); + break; + + case SecureChannel::Id.GetProtocolId(): + lookupTable = MessageTypeTraits::GetTypeToNameTable()->begin(); + lookupTableSize = MessageTypeTraits::GetTypeToNameTable()->size(); + break; + + case BDX::Id.GetProtocolId(): + lookupTable = MessageTypeTraits::GetTypeToNameTable()->begin(); + lookupTableSize = MessageTypeTraits::GetTypeToNameTable()->size(); + break; + + case Echo::Id.GetProtocolId(): + lookupTable = MessageTypeTraits::GetTypeToNameTable()->begin(); + lookupTableSize = MessageTypeTraits::GetTypeToNameTable()->size(); + break; + + case UserDirectedCommissioning::Id.GetProtocolId(): + lookupTable = MessageTypeTraits::GetTypeToNameTable()->begin(); + lookupTableSize = MessageTypeTraits::GetTypeToNameTable()->size(); + break; + + default: + // + // TODO: Add support at some point to let applications to route to custom protocols defined outside of the standard + // namespace in the SDK. + // + return sUnknownTypeName; + } + + return LookupMessageTypeName(lookupTable, lookupTableSize, msgType); +} + +} // namespace Protocols +} // namespace chip diff --git a/src/protocols/Protocols.h b/src/protocols/Protocols.h index faadaeedf652d3..feb075e05ae422 100644 --- a/src/protocols/Protocols.h +++ b/src/protocols/Protocols.h @@ -25,6 +25,7 @@ #pragma once #include +#include namespace chip { namespace Protocols { @@ -92,10 +93,48 @@ CHIP_STANDARD_PROTOCOL(Echo, 0x0004) // Echo Protocol. To // Protocols reserved for internal protocol use static constexpr Id NotSpecified(VendorId::NotSpecified, 0xFFFF); // The profile ID is either not specified or a wildcard -// Pre-delare our MessageTypeTraits so message type headers know what they are -// specializing. +// +// Pre-declaration of type traits that protocol headers are expected to define. +// +// A protocol header should first define an enumeration that lists the various message types as enum classes. +// +// It should then define MessageTypeTraits as a template specialization of that enumeration containing two methods: +// 1. static constexpr const Protocols::Id & ProtocolId() that returns the Protocol ID +// 2. static auto GetTypeToNameTable() that returns a pointer to std::array where N = number of +// messages in protocol. +// template struct MessageTypeTraits; +// +// Encapsulates a tuple of message type ID and its associated name. +// +struct MessageTypeNameLookup +{ + // + // Constructor that takes an enumeration value for a specific message ID and its associated name. + // + template + constexpr MessageTypeNameLookup(T id, const char * name) : mId(to_underlying(id)), mName(name) + {} + + const uint8_t mId; + const char * mName; +}; + +// +// Given a protocol ID and a message type ID, retrieve the logical name of that message. +// +// This will not return a nullptr. +// +const char * GetMessageTypeName(Id protocolId, uint8_t msgType); + +// +// Given a protool ID, retrieve the logical name for that protocol. +// +// This will not return a nullptr. +// +const char * GetProtocolName(Id protocolId); + } // namespace Protocols } // namespace chip diff --git a/src/protocols/bdx/BdxMessages.h b/src/protocols/bdx/BdxMessages.h index d1fb419cc0f470..72e1ad2969ab5d 100644 --- a/src/protocols/bdx/BdxMessages.h +++ b/src/protocols/bdx/BdxMessages.h @@ -29,11 +29,14 @@ #include #include #include + namespace chip { namespace bdx { constexpr uint16_t kMaxFileDesignatorLen = 0xFF; +constexpr const char * kProtocolName = "BDX"; + enum class MessageType : uint8_t { SendInit = 0x01, @@ -312,6 +315,26 @@ template <> struct MessageTypeTraits { static constexpr const Protocols::Id & ProtocolId() { return BDX::Id; } + + static auto GetTypeToNameTable() + { + static const std::array typeToNameTable = { + { + { bdx::MessageType::SendInit, "SendInit" }, + { bdx::MessageType::SendAccept, "SendAccept" }, + { bdx::MessageType::ReceiveInit, "ReceiveInit" }, + { bdx::MessageType::ReceiveAccept, "ReceiveAccept" }, + { bdx::MessageType::BlockQuery, "BlockQuery" }, + { bdx::MessageType::Block, "Block" }, + { bdx::MessageType::BlockEOF, "BlockEOF" }, + { bdx::MessageType::BlockAck, "BlockAck" }, + { bdx::MessageType::BlockAckEOF, "BlockAckEOF" }, + { bdx::MessageType::BlockQueryWithSkip, "BlockQueryWithSkip" }, + }, + }; + + return &typeToNameTable; + } }; } // namespace Protocols diff --git a/src/protocols/echo/Echo.h b/src/protocols/echo/Echo.h index c6fba415b20ba6..510bad30c24ca9 100644 --- a/src/protocols/echo/Echo.h +++ b/src/protocols/echo/Echo.h @@ -38,6 +38,8 @@ namespace chip { namespace Protocols { namespace Echo { +constexpr const char * kProtocolName = "Echo"; + /** * Echo Protocol Message Types */ @@ -159,6 +161,18 @@ template <> struct MessageTypeTraits { static constexpr const Protocols::Id & ProtocolId() { return Echo::Id; } + + static auto GetTypeToNameTable() + { + static const std::array typeToNameTable = { + { + { Echo::MsgType::EchoRequest, "EchoRequest" }, + { Echo::MsgType::EchoResponse, "EchoResponse" }, + }, + }; + + return &typeToNameTable; + } }; } // namespace Protocols diff --git a/src/protocols/interaction_model/Constants.h b/src/protocols/interaction_model/Constants.h index 13bd0481eaf0bd..77839513fa66d1 100644 --- a/src/protocols/interaction_model/Constants.h +++ b/src/protocols/interaction_model/Constants.h @@ -27,6 +27,7 @@ #include +#include #include #include @@ -44,6 +45,8 @@ namespace chip { namespace Protocols { namespace InteractionModel { +constexpr const char * kProtocolName = "IM"; + /** * Version of the Interaction Model used by the node. */ @@ -72,6 +75,26 @@ template <> struct MessageTypeTraits { static constexpr const Protocols::Id & ProtocolId() { return InteractionModel::Id; } + + static auto GetTypeToNameTable() + { + static const std::array typeToNameTable = { + { + { InteractionModel::MsgType::StatusResponse, "StatusResponse" }, + { InteractionModel::MsgType::ReadRequest, "ReadRequest" }, + { InteractionModel::MsgType::SubscribeRequest, "SubscribeRequest" }, + { InteractionModel::MsgType::SubscribeResponse, "SubscribeResponse" }, + { InteractionModel::MsgType::ReportData, "ReportData" }, + { InteractionModel::MsgType::WriteRequest, "WriteRequest" }, + { InteractionModel::MsgType::WriteResponse, "WriteResponse" }, + { InteractionModel::MsgType::InvokeCommandRequest, "InvokeCommandRequest" }, + { InteractionModel::MsgType::InvokeCommandResponse, "InvokeCommandResponse" }, + { InteractionModel::MsgType::TimedRequest, "TimedRequest" }, + }, + }; + + return &typeToNameTable; + } }; } // namespace Protocols diff --git a/src/protocols/secure_channel/Constants.h b/src/protocols/secure_channel/Constants.h index 108b547f86e4f8..2e0b104599e1dc 100644 --- a/src/protocols/secure_channel/Constants.h +++ b/src/protocols/secure_channel/Constants.h @@ -25,6 +25,7 @@ #pragma once +#include #include #include @@ -42,6 +43,8 @@ namespace chip { namespace Protocols { namespace SecureChannel { +constexpr const char * kProtocolName = "SecureChannel"; + /** * SecureChannel Protocol Message Types */ @@ -121,6 +124,29 @@ template <> struct MessageTypeTraits { static constexpr const Protocols::Id & ProtocolId() { return SecureChannel::Id; } + + static auto GetTypeToNameTable() + { + static const std::array typeToNameTable = { + { + { SecureChannel::MsgType::MsgCounterSyncReq, "MsgCounterSyncReq" }, + { SecureChannel::MsgType::MsgCounterSyncRsp, "MsgCounterSyncRsp" }, + { SecureChannel::MsgType::StandaloneAck, "StandaloneAck" }, + { SecureChannel::MsgType::PBKDFParamRequest, "PBKDFParamRequest" }, + { SecureChannel::MsgType::PBKDFParamResponse, "PBKDFParamResponse" }, + { SecureChannel::MsgType::PASE_Pake1, "PASE_Pake1" }, + { SecureChannel::MsgType::PASE_Pake2, "PASE_Pake2" }, + { SecureChannel::MsgType::PASE_Pake3, "PASE_Pake3" }, + { SecureChannel::MsgType::CASE_Sigma1, "CASE_Sigma1" }, + { SecureChannel::MsgType::CASE_Sigma2, "CASE_Sigma2" }, + { SecureChannel::MsgType::CASE_Sigma3, "CASE_Sigma3" }, + { SecureChannel::MsgType::CASE_Sigma2Resume, "CASE_Sigma2Resume" }, + { SecureChannel::MsgType::StatusReport, "StatusReport" }, + }, + }; + + return &typeToNameTable; + } }; } // namespace Protocols diff --git a/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h b/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h index 5857266601c2d7..e21c933455e594 100644 --- a/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h +++ b/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h @@ -41,6 +41,8 @@ namespace chip { namespace Protocols { namespace UserDirectedCommissioning { +constexpr const char * kProtocolName = "UserDirectedCommissioning"; + // Cache contains 16 clients. This may need to be tweaked. constexpr uint8_t kMaxUDCClients = 16; @@ -206,6 +208,17 @@ template <> struct MessageTypeTraits { static constexpr const Protocols::Id & ProtocolId() { return UserDirectedCommissioning::Id; } + + static auto GetTypeToNameTable() + { + static const std::array typeToNameTable = { + { + { UserDirectedCommissioning::MsgType::IdentificationDeclaration, "IdentificationDeclaration" }, + }, + }; + + return &typeToNameTable; + } }; } // namespace Protocols diff --git a/src/pybindings/pycontroller/build-chip-wheel.py b/src/pybindings/pycontroller/build-chip-wheel.py index 41a450b79147f0..2bc04f43c8b23d 100644 --- a/src/pybindings/pycontroller/build-chip-wheel.py +++ b/src/pybindings/pycontroller/build-chip-wheel.py @@ -123,7 +123,7 @@ def finalize_options(self): requiredPackages.append('pyobjc-framework-corebluetooth') if platform.system() == 'Linux': - requiredPackages.append('dbus-python') + requiredPackages.append('dbus-python==1.2.18') requiredPackages.append('pygobject') # diff --git a/src/system/BUILD.gn b/src/system/BUILD.gn index a70b943e1d14d2..97a13e1afc94cc 100644 --- a/src/system/BUILD.gn +++ b/src/system/BUILD.gn @@ -53,6 +53,8 @@ if (chip_device_platform == "cc13x2_26x2") { import("//build_overrides/p6.gni") } else if (chip_device_platform == "cyw30739") { import("//build_overrides/cyw30739_sdk.gni") +} else if (chip_device_platform == "mt793x") { + import("//build_overrides/mt793x_sdk.gni") } buildconfig_header("system_buildconfig") { @@ -163,6 +165,10 @@ source_set("system_config_header") { # Add platform here as needed. } } + + if (chip_device_platform == "mt793x") { + public_deps += [ "${mt793x_sdk_build_root}:mt793x_sdk" ] + } } static_library("system") { diff --git a/src/tools/chip-cert/gen_com_dut_test_vectors.py b/src/tools/chip-cert/gen_com_dut_test_vectors.py index fa83d0064d5fb5..0a5449d65173df 100755 --- a/src/tools/chip-cert/gen_com_dut_test_vectors.py +++ b/src/tools/chip-cert/gen_com_dut_test_vectors.py @@ -944,6 +944,41 @@ def main(): # Generate Test Case Data Container in JSON Format generate_test_case_vector_json(test_case_out_dir, 'cd', test_case) + # Test case: Generate {DAC, PAI, PAA} chain with random (invalid) PAA + test_case_out_dir = args.outdir + '/invalid_paa' + paapath = test_case_out_dir + '/paa-' + + if not os.path.exists(test_case_out_dir): + os.mkdir(test_case_out_dir) + + # Generate PAA Cert/Key + cmd = chipcert + ' gen-att-cert -t a -c "Invalid (Not Registered in the DCL) Matter PAA" -f "' + VALID_IN_PAST + \ + '" -l 4294967295 -o ' + paapath + 'Cert.pem -O ' + paapath + 'Key.pem' + subprocess.run(cmd, shell=True) + + vid = 0xFFF1 + pid = 0x8000 + + # Generate PAI Cert/Key + builder = DevCertBuilder(CertType.PAI, 'no-error', paapath, test_case_out_dir, + chipcert, vid, PID_NOT_PRESENT, '', VALID_IN_PAST) + builder.make_certs_and_keys() + + # Generate DAC Cert/Key + builder = DevCertBuilder(CertType.DAC, 'no-error', paapath, test_case_out_dir, + chipcert, vid, pid, '', VALID_IN_PAST) + builder.make_certs_and_keys() + + # Generate Certification Declaration (CD) + vid_flag = ' -V 0x{:X}'.format(vid) + pid_flag = ' -p 0x{:X}'.format(pid) + cmd = chipcert + ' gen-cd -K ' + cd_key + ' -C ' + cd_cert + ' -O ' + test_case_out_dir + '/cd.der' + \ + ' -f 1 ' + vid_flag + pid_flag + ' -d 0x1234 -c "ZIG20141ZB330001-24" -l 0 -i 0 -n 9876 -t 0' + subprocess.run(cmd, shell=True) + + # Generate Test Case Data Container in JSON Format + generate_test_case_vector_json(test_case_out_dir, test_cert, test_case) + if __name__ == '__main__': sys.exit(main()) diff --git a/src/transport/GroupSession.h b/src/transport/GroupSession.h index 674e4d4537acac..2bc2d82345e151 100644 --- a/src/transport/GroupSession.h +++ b/src/transport/GroupSession.h @@ -44,9 +44,6 @@ class IncomingGroupSession : public Session, public ReferenceCountedGetSessionType()) + { + case Session::SessionType::kGroupIncoming: + case Session::SessionType::kGroupOutgoing: + return "G"; + case Session::SessionType::kSecure: + return "S"; + case Session::SessionType::kUnauthenticated: + return "U"; + default: + return "?"; + } +} + } // namespace Transport } // namespace chip diff --git a/src/transport/Session.h b/src/transport/Session.h index 1e8daac22373a6..52c2868871bf39 100644 --- a/src/transport/Session.h +++ b/src/transport/Session.h @@ -174,9 +174,6 @@ class Session }; virtual SessionType GetSessionType() const = 0; -#if CHIP_PROGRESS_LOGGING - virtual const char * GetSessionTypeString() const = 0; -#endif void AddHolder(SessionHolder & holder) { @@ -257,5 +254,12 @@ class Session FabricIndex mFabricIndex = kUndefinedFabricIndex; }; +// +// Return a string representation of the underlying session. +// +// Always returns a non-null pointer. +// +const char * GetSessionTypeString(const SessionHandle & session); + } // namespace Transport } // namespace chip diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index 252d8ad02959d6..12f76f4b5073a9 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -32,19 +32,19 @@ #include "transport/TraceMessage.h" #include #include +#include #include #include #include #include #include +#include #include #include #include #include #include -#include - // Global object chip::Transport::GroupPeerTable mGroupPeerMsgCounter; @@ -190,7 +190,7 @@ CHIP_ERROR SessionManager::PrepareMessage(const SessionHandle & sessionHandle, P ReturnErrorOnFailure(err); #if CHIP_PROGRESS_LOGGING - destination = kUndefinedNodeId; + destination = NodeIdFromGroupId(groupSession->GetGroupId()); fabricIndex = groupSession->GetFabricIndex(); #endif // CHIP_PROGRESS_LOGGING } @@ -256,13 +256,42 @@ CHIP_ERROR SessionManager::PrepareMessage(const SessionHandle & sessionHandle, P return CHIP_ERROR_INTERNAL; } - ChipLogProgress(Inet, - "Prepared %s message %p to 0x" ChipLogFormatX64 " (%u) of type " ChipLogFormatMessageType - " and protocolId " ChipLogFormatProtocolId " on exchange " ChipLogFormatExchangeId - " with MessageCounter:" ChipLogFormatMessageCounter ".", - sessionHandle->GetSessionTypeString(), &preparedMessage, ChipLogValueX64(destination), fabricIndex, - payloadHeader.GetMessageType(), ChipLogValueProtocolId(payloadHeader.GetProtocolID()), - ChipLogValueExchangeIdFromSentHeader(payloadHeader), packetHeader.GetMessageCounter()); +#if CHIP_PROGRESS_LOGGING + CompressedFabricId compressedFabricId = kUndefinedCompressedFabricId; + + if (fabricIndex != kUndefinedFabricIndex && mFabricTable != nullptr) + { + auto fabricInfo = mFabricTable->FindFabricWithIndex(fabricIndex); + if (fabricInfo) + { + compressedFabricId = fabricInfo->GetCompressedFabricId(); + } + } + + auto * protocolName = Protocols::GetProtocolName(payloadHeader.GetProtocolID()); + auto * msgTypeName = Protocols::GetMessageTypeName(payloadHeader.GetProtocolID(), payloadHeader.GetMessageType()); + + // + // 32-bit value maximum = 10 chars + text preamble (6) + trailer (1) + null (1) + 2 buffer = 20 + // + char ackBuf[20]; + ackBuf[0] = '\0'; + if (payloadHeader.GetAckMessageCounter().HasValue()) + { + snprintf(ackBuf, sizeof(ackBuf), " (Ack:" ChipLogFormatMessageCounter ")", payloadHeader.GetAckMessageCounter().Value()); + } + + // + // Legend that can be used to decode this log line can be found in messaging/README.md + // + ChipLogProgress(ExchangeManager, + "<<< [E:" ChipLogFormatExchangeId " M:" ChipLogFormatMessageCounter "%s] (%s) Msg TX to %u:" ChipLogFormatX64 + " [%04X] --- Type %04X:%02X (%s:%s)", + ChipLogValueExchangeIdFromSentHeader(payloadHeader), packetHeader.GetMessageCounter(), ackBuf, + Transport::GetSessionTypeString(sessionHandle), fabricIndex, ChipLogValueX64(destination), + static_cast(compressedFabricId), payloadHeader.GetProtocolID().GetProtocolId(), + payloadHeader.GetMessageType(), protocolName, msgTypeName); +#endif ReturnErrorOnFailure(packetHeader.EncodeBeforeData(message)); preparedMessage = EncryptedPacketBufferHandle::MarkEncrypted(std::move(message)); @@ -292,13 +321,8 @@ CHIP_ERROR SessionManager::SendPreparedMessage(const SessionHandle & sessionHand char addressStr[Transport::PeerAddress::kMaxToStringSize]; multicastAddress.ToString(addressStr, Transport::PeerAddress::kMaxToStringSize); - ChipLogProgress(Inet, - "Sending %s msg %p with MessageCounter:" ChipLogFormatMessageCounter " to %d" - " at monotonic time: " ChipLogFormatX64 - " msec to Multicast IPV6 address : %s with GroupID of %d and fabric index of %x", - "encrypted group", &preparedMessage, preparedMessage.GetMessageCounter(), groupSession->GetGroupId(), - ChipLogValueX64(System::SystemClock().GetMonotonicMilliseconds64().count()), addressStr, - groupSession->GetGroupId(), groupSession->GetFabricIndex()); + ChipLogProgress(Inet, "(G) Sending msg " ChipLogFormatMessageCounter " to Multicast IPV6 address '%s'", + preparedMessage.GetMessageCounter(), addressStr); } break; case Transport::Session::SessionType::kSecure: { @@ -310,12 +334,8 @@ CHIP_ERROR SessionManager::SendPreparedMessage(const SessionHandle & sessionHand destination = &secure->GetPeerAddress(); - ChipLogProgress(Inet, - "Sending %s msg %p with MessageCounter:" ChipLogFormatMessageCounter " to 0x" ChipLogFormatX64 - " (%u) at monotonic time: " ChipLogFormatX64 " msec", - "encrypted", &preparedMessage, preparedMessage.GetMessageCounter(), - ChipLogValueX64(secure->GetPeerNodeId()), secure->GetFabricIndex(), - ChipLogValueX64(System::SystemClock().GetMonotonicMilliseconds64().count())); + ChipLogProgress(Inet, "(S) Sending msg " ChipLogFormatMessageCounter " on secure session with LSID: %u", + preparedMessage.GetMessageCounter(), secure->GetLocalSessionId()); } break; case Transport::Session::SessionType::kUnauthenticated: { @@ -323,12 +343,13 @@ CHIP_ERROR SessionManager::SendPreparedMessage(const SessionHandle & sessionHand unauthenticated->MarkActive(); destination = &unauthenticated->GetPeerAddress(); - ChipLogProgress(Inet, - "Sending %s msg %p with MessageCounter:" ChipLogFormatMessageCounter " to 0x" ChipLogFormatX64 - " at monotonic time: " ChipLogFormatX64 " msec", - sessionHandle->GetSessionTypeString(), &preparedMessage, preparedMessage.GetMessageCounter(), - ChipLogValueX64(kUndefinedNodeId), - ChipLogValueX64(System::SystemClock().GetMonotonicMilliseconds64().count())); +#if CHIP_PROGRESS_LOGGING + char addressStr[Transport::PeerAddress::kMaxToStringSize]; + destination->ToString(addressStr); + + ChipLogProgress(Inet, "(U) Sending msg " ChipLogFormatMessageCounter " to IP address '%s'", + preparedMessage.GetMessageCounter(), addressStr); +#endif } break; default: diff --git a/src/transport/SessionManager.h b/src/transport/SessionManager.h index 4337c84ee49408..9fac1a18347626 100644 --- a/src/transport/SessionManager.h +++ b/src/transport/SessionManager.h @@ -444,6 +444,8 @@ class DLL_EXPORT SessionManager : public TransportMgrDelegate, public FabricTabl this->FabricRemoved(fabricIndex); } + FabricTable * GetFabricTable() const { return mFabricTable; } + private: /** * The State of a secure transport object. diff --git a/src/transport/UnauthenticatedSessionTable.h b/src/transport/UnauthenticatedSessionTable.h index cdaa7a8a7307c0..a19fb2d908f262 100644 --- a/src/transport/UnauthenticatedSessionTable.h +++ b/src/transport/UnauthenticatedSessionTable.h @@ -66,9 +66,6 @@ class UnauthenticatedSession : public Session, } Session::SessionType GetSessionType() const override { return Session::SessionType::kUnauthenticated; } -#if CHIP_PROGRESS_LOGGING - const char * GetSessionTypeString() const override { return "unauthenticated"; }; -#endif void Retain() override { ReferenceCounted, 0>::Retain(); } void Release() override { ReferenceCounted, 0>::Release(); } diff --git a/third_party/mt793x_sdk/BUILD.gn b/third_party/mt793x_sdk/BUILD.gn new file mode 100644 index 00000000000000..a6e6f2db3ed65f --- /dev/null +++ b/third_party/mt793x_sdk/BUILD.gn @@ -0,0 +1,25 @@ +# 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/mt793x_sdk.gni") +import("${mt793x_sdk_build_root}/mt793x_sdk.gni") + +declare_args() { + # Build target to use for mt793x SDK. Use this to set global SDK defines. + mt793x_sdk_target = "" +} + +group("mt793x_sdk") { + public_deps = [ mt793x_sdk_target ] +} diff --git a/third_party/mt793x_sdk/filogic b/third_party/mt793x_sdk/filogic new file mode 160000 index 00000000000000..1201e7af8b4a2d --- /dev/null +++ b/third_party/mt793x_sdk/filogic @@ -0,0 +1 @@ +Subproject commit 1201e7af8b4a2d32c2b55bb98b76dd212a2e519e diff --git a/third_party/mt793x_sdk/lwip b/third_party/mt793x_sdk/lwip new file mode 160000 index 00000000000000..e9c4e9089e0390 --- /dev/null +++ b/third_party/mt793x_sdk/lwip @@ -0,0 +1 @@ +Subproject commit e9c4e9089e0390770795543f33942b247dfeed51 diff --git a/third_party/mt793x_sdk/mDNSResponder b/third_party/mt793x_sdk/mDNSResponder new file mode 160000 index 00000000000000..060b8b575976cf --- /dev/null +++ b/third_party/mt793x_sdk/mDNSResponder @@ -0,0 +1 @@ +Subproject commit 060b8b575976cf4356b8f0c1af801473db92f4c7 diff --git a/third_party/mt793x_sdk/mt793x_arm.gni b/third_party/mt793x_sdk/mt793x_arm.gni new file mode 100644 index 00000000000000..55396473e6ed62 --- /dev/null +++ b/third_party/mt793x_sdk/mt793x_arm.gni @@ -0,0 +1,19 @@ +# Copyright (c) 2022 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. + +arm_arch = "armv8-m.main+dsp" +arm_abi = "aapcs" +arm_cpu = "cortex-m33" +arm_float_abi = "hard" +arm_fpu = "fpv5-sp-d16" diff --git a/third_party/mt793x_sdk/mt793x_executable.gni b/third_party/mt793x_sdk/mt793x_executable.gni new file mode 100644 index 00000000000000..3e4df995414446 --- /dev/null +++ b/third_party/mt793x_sdk/mt793x_executable.gni @@ -0,0 +1,79 @@ +# 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") +import("//build_overrides/chip.gni") +import("//build_overrides/mt793x_sdk.gni") +import("${build_root}/toolchain/flashable_executable.gni") + +template("mt793x_executable") { + output_base_name = get_path_info(invoker.output_name, "name") + + objcopy_image_name = output_base_name + ".bin" + objcopy_image_format = "binary" + objcopy = "arm-none-eabi-objcopy" + + flash_target_name = target_name + ".flash_executable" + flashbundle_name = "${target_name}.flashbundle.txt" + flashable_executable(flash_target_name) { + forward_variables_from(invoker, "*") + } + + action("scatter_file") { + script = "${mt793x_sdk_build_root}/filogic/project/mt7933_hdk/apps/matter_sdk/scripts/scatter_file_generator.py" + outputs = [ "${target_gen_dir}/scatter.ini" ] + + args = [ + "--output", + "/" + rebase_path(root_out_dir, "/") + "/scatter.ini", + "--bl_path", + "mt7931an_bootloader-xip.sgn", + "--img_path", + "${objcopy_image_name}", + "--bt_path", + "BT_RAM_CODE_MT7933_2_1_hdr.bin", + "--wifi_path", + "WIFI_RAM_CODE_MT7933_ALL.bin", + ] + + gen_deps = [ ":$flash_target_name" ] + } + + action("copy_file") { + script = "${mt793x_sdk_build_root}/filogic/project/mt7933_hdk/apps/matter_sdk/scripts/copy_file.py" + outputs = [ "${target_out_dir}" ] + + args = [ + "--outputdir", + "/" + rebase_path(root_out_dir, "/"), + "--bl_path", + rebase_path(mt793x_sdk_build_root, root_out_dir) + "/filogic/project/mt7933_hdk/apps/matter_sdk/bootloader/mt7931an_bootloader-xip.sgn", + "--bt_path", + rebase_path(mt793x_sdk_build_root, root_out_dir) + + "/filogic/prebuilt/driver/chip/mt7933/BT_RAM_CODE_MT7933_2_1_hdr.bin", + "--wifi_path", + rebase_path(mt793x_sdk_build_root, root_out_dir) + + "/filogic/prebuilt/driver/chip/mt7933/WIFI_RAM_CODE_MT7933_ALL.bin", + ] + + gen_deps = [ ":$flash_target_name" ] + } + group(target_name) { + deps = [ + ":$flash_target_name", + ":copy_file", + ":scatter_file", + ] + } +} diff --git a/third_party/mt793x_sdk/mt793x_sdk.gni b/third_party/mt793x_sdk/mt793x_sdk.gni new file mode 100644 index 00000000000000..82db0affed9cf9 --- /dev/null +++ b/third_party/mt793x_sdk/mt793x_sdk.gni @@ -0,0 +1,102 @@ +# Copyright (c) 2022 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/mbedtls.gni") +import("//build_overrides/mt793x_sdk.gni") +import("${chip_root}/src/crypto/crypto.gni") +import("${chip_root}/src/platform/mt793x/args.gni") +import("${chip_root}/src/platform/mt793x/lwip/lwip.gni") + +# +# Defines an mt793x SDK build target. +# +# Parameters: +# sources - Extra source files to build. +# + +declare_args() { + mt793x_sdk_developer = getenv("MTK_DEV") +} + +if (mt793x_sdk_developer == "") { + import( + "${mt793x_sdk_build_root}/filogic/project/mt7933_hdk/apps/matter_sdk/matter_sdk.gni") +} else { + import( + "${mt793x_sdk_build_root}/filogic/project/mt7933_hdk/apps/matter_sdk/matter_sdk_internal.gni") +} + +template("mt793x_sdk") { + sdk_target_name = target_name + + matter_sdk("matter_sdk") { + include_dirs = [] + + if (defined(invoker.include_dirs)) { + include_dirs += invoker.include_dirs + } + + include_dirs += [ + "${lwip_root}/repo/lwip/ports/include", + "${lwip_root}/repo/lwip/src/include", + ] + + defines = [] + + if (chip_mdns == "platform") { + defines += [ + "OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1", + "OPENTHREAD_CONFIG_ECDSA_ENABLE=1", + "OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE=1", + "OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1", + ] + } + } + + config("${sdk_target_name}_config") { + if (!defined(include_dirs)) { + include_dirs = [] + } + + if (defined(invoker.include_dirs)) { + include_dirs += invoker.include_dirs + } + + libs = [] + + defines = [] + + if (defined(invoker.defines)) { + defines += invoker.defines + } + } + + # TODO - Break up this monolith and make it configurable. + source_set(sdk_target_name) { + forward_variables_from(invoker, "*") + + if (!defined(sources)) { + sources = [] + } + + if (!defined(public_configs)) { + public_configs = [] + } + + public_deps = [ ":matter_sdk" ] + + public_configs += [ ":${sdk_target_name}_config" ] + } +} 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 a6e5c112998838..1c20ef2431cc09 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -308,13 +308,14 @@ class SubscribeAttributeIdentifyIdentifyTime : public SubscribeAttribute { MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeIdentifyTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeIdentifyTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -374,13 +375,14 @@ class SubscribeAttributeIdentifyIdentifyType : public SubscribeAttribute { MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeIdentifyTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeIdentifyTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -440,13 +442,14 @@ class SubscribeAttributeIdentifyGeneratedCommandList : public SubscribeAttribute MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -506,13 +509,14 @@ class SubscribeAttributeIdentifyAcceptedCommandList : public SubscribeAttribute MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -572,13 +576,14 @@ class SubscribeAttributeIdentifyAttributeList : public SubscribeAttribute { MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -638,13 +643,14 @@ class SubscribeAttributeIdentifyFeatureMap : public SubscribeAttribute { MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -704,13 +710,14 @@ class SubscribeAttributeIdentifyClusterRevision : public SubscribeAttribute { MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -1089,13 +1096,14 @@ class SubscribeAttributeGroupsNameSupport : public SubscribeAttribute { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNameSupportWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNameSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -1155,13 +1163,14 @@ class SubscribeAttributeGroupsGeneratedCommandList : public SubscribeAttribute { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -1221,13 +1230,14 @@ class SubscribeAttributeGroupsAcceptedCommandList : public SubscribeAttribute { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -1287,13 +1297,14 @@ class SubscribeAttributeGroupsAttributeList : public SubscribeAttribute { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -1353,13 +1364,14 @@ class SubscribeAttributeGroupsFeatureMap : public SubscribeAttribute { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -1419,13 +1431,14 @@ class SubscribeAttributeGroupsClusterRevision : public SubscribeAttribute { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2109,13 +2122,14 @@ class SubscribeAttributeScenesSceneCount : public SubscribeAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSceneCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSceneCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2175,13 +2189,14 @@ class SubscribeAttributeScenesCurrentScene : public SubscribeAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentSceneWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentSceneWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2241,13 +2256,14 @@ class SubscribeAttributeScenesCurrentGroup : public SubscribeAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentGroupWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentGroupWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2307,13 +2323,14 @@ class SubscribeAttributeScenesSceneValid : public SubscribeAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSceneValidWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSceneValidWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2373,13 +2390,14 @@ class SubscribeAttributeScenesNameSupport : public SubscribeAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNameSupportWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNameSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2439,13 +2457,14 @@ class SubscribeAttributeScenesLastConfiguredBy : public SubscribeAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLastConfiguredByWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLastConfiguredByWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2505,13 +2524,14 @@ class SubscribeAttributeScenesGeneratedCommandList : public SubscribeAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2571,13 +2591,14 @@ class SubscribeAttributeScenesAcceptedCommandList : public SubscribeAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2637,13 +2658,14 @@ class SubscribeAttributeScenesAttributeList : public SubscribeAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2703,13 +2725,14 @@ class SubscribeAttributeScenesFeatureMap : public SubscribeAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2769,13 +2792,14 @@ class SubscribeAttributeScenesClusterRevision : public SubscribeAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3131,13 +3155,14 @@ class SubscribeAttributeOnOffOnOff : public SubscribeAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOnOffWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOnOffWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3197,13 +3222,14 @@ class SubscribeAttributeOnOffGlobalSceneControl : public SubscribeAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGlobalSceneControlWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGlobalSceneControlWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3303,13 +3329,14 @@ class SubscribeAttributeOnOffOnTime : public SubscribeAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOnTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOnTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3409,13 +3436,14 @@ class SubscribeAttributeOnOffOffWaitTime : public SubscribeAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOffWaitTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOffWaitTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3515,13 +3543,14 @@ class SubscribeAttributeOnOffStartUpOnOff : public SubscribeAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeStartUpOnOffWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeStartUpOnOffWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3581,13 +3610,14 @@ class SubscribeAttributeOnOffGeneratedCommandList : public SubscribeAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3647,13 +3677,14 @@ class SubscribeAttributeOnOffAcceptedCommandList : public SubscribeAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3713,13 +3744,14 @@ class SubscribeAttributeOnOffAttributeList : public SubscribeAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3779,13 +3811,14 @@ class SubscribeAttributeOnOffFeatureMap : public SubscribeAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3845,13 +3878,14 @@ class SubscribeAttributeOnOffClusterRevision : public SubscribeAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3926,13 +3960,14 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchType : public SubscribeAtt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSwitchTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSwitchTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4029,13 +4064,14 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchActions : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSwitchActionsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSwitchActionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4093,13 +4129,14 @@ class SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList : public Su dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4157,13 +4194,14 @@ class SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList : public Sub dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4221,13 +4259,14 @@ class SubscribeAttributeOnOffSwitchConfigurationAttributeList : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4285,13 +4324,14 @@ class SubscribeAttributeOnOffSwitchConfigurationFeatureMap : public SubscribeAtt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4349,13 +4389,14 @@ class SubscribeAttributeOnOffSwitchConfigurationClusterRevision : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4935,13 +4976,14 @@ class SubscribeAttributeLevelControlCurrentLevel : public SubscribeAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5001,13 +5043,14 @@ class SubscribeAttributeLevelControlRemainingTime : public SubscribeAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRemainingTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRemainingTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5067,13 +5110,14 @@ class SubscribeAttributeLevelControlMinLevel : public SubscribeAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5133,13 +5177,14 @@ class SubscribeAttributeLevelControlMaxLevel : public SubscribeAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5199,13 +5244,14 @@ class SubscribeAttributeLevelControlCurrentFrequency : public SubscribeAttribute MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentFrequencyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentFrequencyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5265,13 +5311,14 @@ class SubscribeAttributeLevelControlMinFrequency : public SubscribeAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinFrequencyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinFrequencyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5331,13 +5378,14 @@ class SubscribeAttributeLevelControlMaxFrequency : public SubscribeAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxFrequencyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxFrequencyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5437,13 +5485,14 @@ class SubscribeAttributeLevelControlOptions : public SubscribeAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOptionsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOptionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5543,13 +5592,14 @@ class SubscribeAttributeLevelControlOnOffTransitionTime : public SubscribeAttrib MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOnOffTransitionTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOnOffTransitionTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5649,13 +5699,14 @@ class SubscribeAttributeLevelControlOnLevel : public SubscribeAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOnLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOnLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5755,13 +5806,14 @@ class SubscribeAttributeLevelControlOnTransitionTime : public SubscribeAttribute MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOnTransitionTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOnTransitionTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5861,13 +5913,14 @@ class SubscribeAttributeLevelControlOffTransitionTime : public SubscribeAttribut MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOffTransitionTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOffTransitionTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5967,13 +6020,14 @@ class SubscribeAttributeLevelControlDefaultMoveRate : public SubscribeAttribute MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDefaultMoveRateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDefaultMoveRateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6073,13 +6127,14 @@ class SubscribeAttributeLevelControlStartUpCurrentLevel : public SubscribeAttrib MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeStartUpCurrentLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeStartUpCurrentLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6139,13 +6194,14 @@ class SubscribeAttributeLevelControlGeneratedCommandList : public SubscribeAttri MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6205,13 +6261,14 @@ class SubscribeAttributeLevelControlAcceptedCommandList : public SubscribeAttrib MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6271,13 +6328,14 @@ class SubscribeAttributeLevelControlAttributeList : public SubscribeAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6337,13 +6395,14 @@ class SubscribeAttributeLevelControlFeatureMap : public SubscribeAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6403,13 +6462,14 @@ class SubscribeAttributeLevelControlClusterRevision : public SubscribeAttribute MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6535,13 +6595,14 @@ class SubscribeAttributeBinaryInputBasicActiveText : public SubscribeAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActiveTextWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActiveTextWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6643,13 +6704,14 @@ class SubscribeAttributeBinaryInputBasicDescription : public SubscribeAttribute MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDescriptionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDescriptionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6751,13 +6813,14 @@ class SubscribeAttributeBinaryInputBasicInactiveText : public SubscribeAttribute MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInactiveTextWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInactiveTextWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6857,13 +6920,14 @@ class SubscribeAttributeBinaryInputBasicOutOfService : public SubscribeAttribute MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOutOfServiceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOutOfServiceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6923,13 +6987,14 @@ class SubscribeAttributeBinaryInputBasicPolarity : public SubscribeAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePolarityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePolarityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7029,13 +7094,14 @@ class SubscribeAttributeBinaryInputBasicPresentValue : public SubscribeAttribute MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePresentValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePresentValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7135,13 +7201,14 @@ class SubscribeAttributeBinaryInputBasicReliability : public SubscribeAttribute MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeReliabilityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeReliabilityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7201,13 +7268,14 @@ class SubscribeAttributeBinaryInputBasicStatusFlags : public SubscribeAttribute MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeStatusFlagsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeStatusFlagsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7267,13 +7335,14 @@ class SubscribeAttributeBinaryInputBasicApplicationType : public SubscribeAttrib MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeApplicationTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeApplicationTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7333,13 +7402,14 @@ class SubscribeAttributeBinaryInputBasicGeneratedCommandList : public SubscribeA MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7399,13 +7469,14 @@ class SubscribeAttributeBinaryInputBasicAcceptedCommandList : public SubscribeAt MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7465,13 +7536,14 @@ class SubscribeAttributeBinaryInputBasicAttributeList : public SubscribeAttribut MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7531,13 +7603,14 @@ class SubscribeAttributeBinaryInputBasicFeatureMap : public SubscribeAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7597,13 +7670,14 @@ class SubscribeAttributeBinaryInputBasicClusterRevision : public SubscribeAttrib MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7682,13 +7756,14 @@ class SubscribeAttributeDescriptorDeviceTypeList : public SubscribeAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDeviceTypeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDeviceTypeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7748,13 +7823,14 @@ class SubscribeAttributeDescriptorServerList : public SubscribeAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeServerListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeServerListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7814,13 +7890,14 @@ class SubscribeAttributeDescriptorClientList : public SubscribeAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClientListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClientListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7880,13 +7957,14 @@ class SubscribeAttributeDescriptorPartsList : public SubscribeAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePartsListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePartsListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7946,13 +8024,14 @@ class SubscribeAttributeDescriptorGeneratedCommandList : public SubscribeAttribu MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8012,13 +8091,14 @@ class SubscribeAttributeDescriptorAcceptedCommandList : public SubscribeAttribut MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8078,13 +8158,14 @@ class SubscribeAttributeDescriptorAttributeList : public SubscribeAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8144,13 +8225,14 @@ class SubscribeAttributeDescriptorFeatureMap : public SubscribeAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8210,13 +8292,14 @@ class SubscribeAttributeDescriptorClusterRevision : public SubscribeAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8266,7 +8349,9 @@ class ReadBindingBinding : public ReadAttribute { endpoint:@(endpointId) queue:callbackQueue]; MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } [cluster readAttributeBindingWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.Binding response %@", [value description]); @@ -8367,13 +8452,14 @@ class SubscribeAttributeBindingBinding : public SubscribeAttribute { MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBindingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBindingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8433,13 +8519,14 @@ class SubscribeAttributeBindingGeneratedCommandList : public SubscribeAttribute MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8499,13 +8586,14 @@ class SubscribeAttributeBindingAcceptedCommandList : public SubscribeAttribute { MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8565,13 +8653,14 @@ class SubscribeAttributeBindingAttributeList : public SubscribeAttribute { MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8631,13 +8720,14 @@ class SubscribeAttributeBindingFeatureMap : public SubscribeAttribute { MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8697,13 +8787,14 @@ class SubscribeAttributeBindingClusterRevision : public SubscribeAttribute { MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8759,7 +8850,9 @@ class ReadAccessControlAcl : public ReadAttribute { endpoint:@(endpointId) queue:callbackQueue]; MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } [cluster readAttributeAclWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.Acl response %@", [value description]); @@ -8884,13 +8977,14 @@ class SubscribeAttributeAccessControlAcl : public SubscribeAttribute { MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAclWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAclWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8924,7 +9018,9 @@ class ReadAccessControlExtension : public ReadAttribute { endpoint:@(endpointId) queue:callbackQueue]; MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } [cluster readAttributeExtensionWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.Extension response %@", [value description]); @@ -9007,13 +9103,14 @@ class SubscribeAttributeAccessControlExtension : public SubscribeAttribute { MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeExtensionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeExtensionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9073,13 +9170,14 @@ class SubscribeAttributeAccessControlSubjectsPerAccessControlEntry : public Subs MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSubjectsPerAccessControlEntryWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9139,13 +9237,14 @@ class SubscribeAttributeAccessControlTargetsPerAccessControlEntry : public Subsc MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTargetsPerAccessControlEntryWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9205,13 +9304,14 @@ class SubscribeAttributeAccessControlAccessControlEntriesPerFabric : public Subs MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAccessControlEntriesPerFabricWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9271,13 +9371,14 @@ class SubscribeAttributeAccessControlGeneratedCommandList : public SubscribeAttr MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9337,13 +9438,14 @@ class SubscribeAttributeAccessControlAcceptedCommandList : public SubscribeAttri MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9403,13 +9505,14 @@ class SubscribeAttributeAccessControlAttributeList : public SubscribeAttribute { MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9469,13 +9572,14 @@ class SubscribeAttributeAccessControlFeatureMap : public SubscribeAttribute { MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9535,13 +9639,14 @@ class SubscribeAttributeAccessControlClusterRevision : public SubscribeAttribute MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10267,13 +10372,14 @@ class SubscribeAttributeActionsActionList : public SubscribeAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActionListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActionListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10333,13 +10439,14 @@ class SubscribeAttributeActionsEndpointLists : public SubscribeAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEndpointListsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEndpointListsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10399,13 +10506,14 @@ class SubscribeAttributeActionsSetupURL : public SubscribeAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSetupURLWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSetupURLWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10465,13 +10573,14 @@ class SubscribeAttributeActionsGeneratedCommandList : public SubscribeAttribute MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10531,13 +10640,14 @@ class SubscribeAttributeActionsAcceptedCommandList : public SubscribeAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10597,13 +10707,14 @@ class SubscribeAttributeActionsAttributeList : public SubscribeAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10663,13 +10774,14 @@ class SubscribeAttributeActionsFeatureMap : public SubscribeAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10729,13 +10841,14 @@ class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10878,13 +10991,14 @@ class SubscribeAttributeBasicDataModelRevision : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDataModelRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDataModelRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10944,13 +11058,14 @@ class SubscribeAttributeBasicVendorName : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeVendorNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeVendorNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11010,13 +11125,14 @@ class SubscribeAttributeBasicVendorID : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeVendorIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeVendorIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11076,13 +11192,14 @@ class SubscribeAttributeBasicProductName : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeProductNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeProductNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11142,13 +11259,14 @@ class SubscribeAttributeBasicProductID : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeProductIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeProductIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11250,13 +11368,14 @@ class SubscribeAttributeBasicNodeLabel : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNodeLabelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNodeLabelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11358,13 +11477,14 @@ class SubscribeAttributeBasicLocation : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLocationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLocationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11424,13 +11544,14 @@ class SubscribeAttributeBasicHardwareVersion : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeHardwareVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeHardwareVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11490,13 +11611,14 @@ class SubscribeAttributeBasicHardwareVersionString : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeHardwareVersionStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeHardwareVersionStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11556,13 +11678,14 @@ class SubscribeAttributeBasicSoftwareVersion : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSoftwareVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSoftwareVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11622,13 +11745,14 @@ class SubscribeAttributeBasicSoftwareVersionString : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSoftwareVersionStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSoftwareVersionStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11688,13 +11812,14 @@ class SubscribeAttributeBasicManufacturingDate : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeManufacturingDateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeManufacturingDateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11754,13 +11879,14 @@ class SubscribeAttributeBasicPartNumber : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePartNumberWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePartNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11820,13 +11946,14 @@ class SubscribeAttributeBasicProductURL : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeProductURLWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeProductURLWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11886,13 +12013,14 @@ class SubscribeAttributeBasicProductLabel : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeProductLabelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeProductLabelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11952,13 +12080,14 @@ class SubscribeAttributeBasicSerialNumber : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSerialNumberWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSerialNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12058,13 +12187,14 @@ class SubscribeAttributeBasicLocalConfigDisabled : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLocalConfigDisabledWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLocalConfigDisabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12124,13 +12254,14 @@ class SubscribeAttributeBasicReachable : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeReachableWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeReachableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12190,13 +12321,14 @@ class SubscribeAttributeBasicUniqueID : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUniqueIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUniqueIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12257,13 +12389,14 @@ class SubscribeAttributeBasicCapabilityMinima : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCapabilityMinimaWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCapabilityMinimaWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12323,13 +12456,14 @@ class SubscribeAttributeBasicGeneratedCommandList : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12389,13 +12523,14 @@ class SubscribeAttributeBasicAcceptedCommandList : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12455,13 +12590,14 @@ class SubscribeAttributeBasicAttributeList : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12521,13 +12657,14 @@ class SubscribeAttributeBasicFeatureMap : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12587,13 +12724,14 @@ class SubscribeAttributeBasicClusterRevision : public SubscribeAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12856,13 +12994,14 @@ class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public S dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateProvider * cluster = [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12920,13 +13059,14 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public Su dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateProvider * cluster = [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12984,13 +13124,14 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateProvider * cluster = [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13048,13 +13189,14 @@ class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateProvider * cluster = [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13112,13 +13254,14 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateProvider * cluster = [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13232,7 +13375,9 @@ class ReadOtaSoftwareUpdateRequestorDefaultOtaProviders : public ReadAttribute { MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } [cluster readAttributeDefaultOtaProvidersWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { @@ -13318,13 +13463,14 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOtaProviders : public S dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDefaultOtaProvidersWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDefaultOtaProvidersWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13382,13 +13528,14 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUpdatePossibleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUpdatePossibleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13446,13 +13593,14 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUpdateStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUpdateStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13510,13 +13658,14 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public S dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUpdateStateProgressWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUpdateStateProgressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13574,13 +13723,14 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13638,13 +13788,14 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public S dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13702,13 +13853,14 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13766,13 +13918,14 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13830,13 +13983,14 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13952,13 +14106,14 @@ class SubscribeAttributeLocalizationConfigurationActiveLocale : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActiveLocaleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActiveLocaleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14016,13 +14171,14 @@ class SubscribeAttributeLocalizationConfigurationSupportedLocales : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSupportedLocalesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSupportedLocalesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14080,13 +14236,14 @@ class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public S dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14144,13 +14301,14 @@ class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public Su dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14208,13 +14366,14 @@ class SubscribeAttributeLocalizationConfigurationAttributeList : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14272,13 +14431,14 @@ class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14336,13 +14496,14 @@ class SubscribeAttributeLocalizationConfigurationClusterRevision : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14457,13 +14618,14 @@ class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeHourFormatWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeHourFormatWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14560,13 +14722,14 @@ class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActiveCalendarTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActiveCalendarTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14624,13 +14787,14 @@ class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public Su dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSupportedCalendarTypesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSupportedCalendarTypesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14688,13 +14852,14 @@ class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public Subs dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14752,13 +14917,14 @@ class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14816,13 +14982,14 @@ class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14880,13 +15047,14 @@ class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14944,13 +15112,14 @@ class SubscribeAttributeTimeFormatLocalizationClusterRevision : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15066,13 +15235,14 @@ class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttrib MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTemperatureUnitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTemperatureUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15132,13 +15302,14 @@ class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeA MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15198,13 +15369,14 @@ class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAt MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15264,13 +15436,14 @@ class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribut MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15330,13 +15503,14 @@ class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15396,13 +15570,14 @@ class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttrib MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15476,13 +15651,14 @@ class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPowerSourceConfiguration * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSourcesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSourcesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15540,13 +15716,14 @@ class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public Su dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPowerSourceConfiguration * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15604,13 +15781,14 @@ class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public Sub dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPowerSourceConfiguration * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15668,13 +15846,14 @@ class SubscribeAttributePowerSourceConfigurationAttributeList : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPowerSourceConfiguration * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15732,13 +15911,14 @@ class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAtt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPowerSourceConfiguration * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15796,13 +15976,14 @@ class SubscribeAttributePowerSourceConfigurationClusterRevision : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPowerSourceConfiguration * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15908,13 +16089,14 @@ class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15974,13 +16156,14 @@ class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOrderWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOrderWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16040,13 +16223,14 @@ class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDescriptionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDescriptionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16106,13 +16290,14 @@ class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeA MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWiredAssessedInputVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWiredAssessedInputVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16172,13 +16357,14 @@ class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public Subscrib MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWiredAssessedInputFrequencyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16238,13 +16424,14 @@ class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWiredCurrentTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWiredCurrentTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16304,13 +16491,14 @@ class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttrib MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWiredAssessedCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWiredAssessedCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16370,13 +16558,14 @@ class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribu MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWiredNominalVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWiredNominalVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16436,13 +16625,14 @@ class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribu MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWiredMaximumCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWiredMaximumCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16502,13 +16692,14 @@ class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWiredPresentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWiredPresentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16568,13 +16759,14 @@ class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActiveWiredFaultsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActiveWiredFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16634,13 +16826,14 @@ class SubscribeAttributePowerSourceBatVoltage : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16700,13 +16893,14 @@ class SubscribeAttributePowerSourceBatPercentRemaining : public SubscribeAttribu MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatPercentRemainingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatPercentRemainingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16766,13 +16960,14 @@ class SubscribeAttributePowerSourceBatTimeRemaining : public SubscribeAttribute MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatTimeRemainingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatTimeRemainingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16832,13 +17027,14 @@ class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatChargeLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatChargeLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16898,13 +17094,14 @@ class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttrib MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatReplacementNeededWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatReplacementNeededWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16964,13 +17161,14 @@ class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatReplaceabilityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatReplaceabilityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17030,13 +17228,14 @@ class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatPresentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatPresentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17096,13 +17295,14 @@ class SubscribeAttributePowerSourceActiveBatFaults : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActiveBatFaultsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActiveBatFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17162,13 +17362,14 @@ class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeA MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatReplacementDescriptionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatReplacementDescriptionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17228,13 +17429,14 @@ class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttrib MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatCommonDesignationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatCommonDesignationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17294,13 +17496,14 @@ class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribut MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatANSIDesignationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatANSIDesignationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17360,13 +17563,14 @@ class SubscribeAttributePowerSourceBatIECDesignation : public SubscribeAttribute MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatIECDesignationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatIECDesignationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17426,13 +17630,14 @@ class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttrib MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatApprovedChemistryWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatApprovedChemistryWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17492,13 +17697,14 @@ class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatCapacityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17558,13 +17764,14 @@ class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatQuantityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatQuantityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17624,13 +17831,14 @@ class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatChargeStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatChargeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17690,13 +17898,14 @@ class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribu MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatTimeToFullChargeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatTimeToFullChargeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17756,13 +17965,14 @@ class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public Subscribe MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatFunctionalWhileChargingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatFunctionalWhileChargingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17822,13 +18032,14 @@ class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribut MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBatChargingCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBatChargingCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17888,13 +18099,14 @@ class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttri MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActiveBatChargeFaultsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActiveBatChargeFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17954,13 +18166,14 @@ class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttrib MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18020,13 +18233,14 @@ class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribu MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18086,13 +18300,14 @@ class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18152,13 +18367,14 @@ class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18218,13 +18434,14 @@ class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18498,13 +18715,14 @@ class SubscribeAttributeGeneralCommissioningBreadcrumb : public SubscribeAttribu MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBreadcrumbWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBreadcrumbWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18565,13 +18783,14 @@ class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public Subs MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBasicCommissioningInfoWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBasicCommissioningInfoWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18631,13 +18850,14 @@ class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeA MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRegulatoryConfigWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRegulatoryConfigWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18697,13 +18917,14 @@ class SubscribeAttributeGeneralCommissioningLocationCapability : public Subscrib MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLocationCapabilityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLocationCapabilityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18763,13 +18984,14 @@ class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : publi MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSupportsConcurrentConnectionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSupportsConcurrentConnectionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18829,13 +19051,14 @@ class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public Subscr MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18895,13 +19118,14 @@ class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public Subscri MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18961,13 +19185,14 @@ class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttr MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19027,13 +19252,14 @@ class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribu MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19093,13 +19319,14 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19528,13 +19755,14 @@ class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttrib MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxNetworksWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxNetworksWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19594,13 +19822,14 @@ class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNetworksWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNetworksWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19660,13 +19889,14 @@ class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public Subscrib MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeScanMaxTimeSecondsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeScanMaxTimeSecondsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19726,13 +19956,14 @@ class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public Subsc MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeConnectMaxTimeSecondsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeConnectMaxTimeSecondsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19832,13 +20063,14 @@ class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeA MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInterfaceEnabledWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInterfaceEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19898,13 +20130,14 @@ class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public Subscr MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLastNetworkingStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLastNetworkingStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19964,13 +20197,14 @@ class SubscribeAttributeNetworkCommissioningLastNetworkID : public SubscribeAttr MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLastNetworkIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLastNetworkIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20030,13 +20264,14 @@ class SubscribeAttributeNetworkCommissioningLastConnectErrorValue : public Subsc MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLastConnectErrorValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLastConnectErrorValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20096,13 +20331,14 @@ class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public Subscr MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20162,13 +20398,14 @@ class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public Subscri MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20228,13 +20465,14 @@ class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttr MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20294,13 +20532,14 @@ class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribu MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20360,13 +20599,14 @@ class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAt MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20495,13 +20735,14 @@ class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAtt MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20561,13 +20802,14 @@ class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttr MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20627,13 +20869,14 @@ class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20693,13 +20936,14 @@ class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20759,13 +21003,14 @@ class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribut MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20902,13 +21147,14 @@ class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAt MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNetworkInterfacesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNetworkInterfacesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20968,13 +21214,14 @@ class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribut MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRebootCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRebootCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21034,13 +21281,14 @@ class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUpTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUpTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21100,13 +21348,14 @@ class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public Subscri MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTotalOperationalHoursWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTotalOperationalHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21166,13 +21415,14 @@ class SubscribeAttributeGeneralDiagnosticsBootReasons : public SubscribeAttribut MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBootReasonsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBootReasonsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21232,13 +21482,14 @@ class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public Subscrib MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActiveHardwareFaultsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActiveHardwareFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21298,13 +21549,14 @@ class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAt MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActiveRadioFaultsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActiveRadioFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21364,13 +21616,14 @@ class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public Subscribe MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActiveNetworkFaultsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActiveNetworkFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21430,13 +21683,14 @@ class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public Subs MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTestEventTriggersEnabledWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTestEventTriggersEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21496,13 +21750,14 @@ class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public Subscrib MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21562,13 +21817,14 @@ class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public Subscribe MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21628,13 +21884,14 @@ class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttrib MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21694,13 +21951,14 @@ class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21760,13 +22018,14 @@ class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttr MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21890,13 +22149,14 @@ class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttri MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeThreadMetricsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeThreadMetricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21956,13 +22216,14 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAtt MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentHeapFreeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentHeapFreeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22022,13 +22283,14 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAtt MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentHeapUsedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentHeapUsedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22088,13 +22350,14 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public Sub MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentHeapHighWatermarkWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22154,13 +22417,14 @@ class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public Subscri MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22220,13 +22484,14 @@ class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public Subscrib MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22286,13 +22551,14 @@ class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttri MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22352,13 +22618,14 @@ class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribut MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22418,13 +22685,14 @@ class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAtt MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22605,13 +22873,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeChannelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeChannelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22669,13 +22938,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRoutingRoleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRoutingRoleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22733,13 +23003,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNetworkNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNetworkNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22797,13 +23068,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribut dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePanIdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePanIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22861,13 +23133,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeExtendedPanIdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeExtendedPanIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22925,13 +23198,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeshLocalPrefixWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeshLocalPrefixWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22989,13 +23263,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOverrunCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOverrunCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23053,13 +23328,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsNeighborTableList : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNeighborTableListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNeighborTableListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23117,13 +23393,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouteTableList : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRouteTableListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRouteTableListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23181,13 +23458,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePartitionIdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePartitionIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23245,13 +23523,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWeightingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWeightingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23309,13 +23588,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDataVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDataVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23373,13 +23653,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeStableDataVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeStableDataVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23437,13 +23718,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLeaderRouterIdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLeaderRouterIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23501,13 +23783,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDetachedRoleCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDetachedRoleCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23565,13 +23848,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeChildRoleCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeChildRoleCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23629,13 +23913,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRouterRoleCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRouterRoleCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23693,13 +23978,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLeaderRoleCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLeaderRoleCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23757,13 +24043,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public Subs dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttachAttemptCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttachAttemptCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23821,13 +24108,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePartitionIdChangeCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePartitionIdChangeCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23886,13 +24174,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCoun dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBetterPartitionAttachAttemptCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23950,13 +24239,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeParentChangeCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeParentChangeCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24014,13 +24304,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxTotalCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxTotalCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24078,13 +24369,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxUnicastCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxUnicastCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24142,13 +24434,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxBroadcastCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxBroadcastCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24206,13 +24499,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public Sub dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxAckRequestedCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxAckRequestedCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24270,13 +24564,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxAckedCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxAckedCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24334,13 +24629,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public S dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxNoAckRequestedCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxNoAckRequestedCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24398,13 +24694,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxDataCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxDataCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24462,13 +24759,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxDataPollCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxDataPollCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24526,13 +24824,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxBeaconCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxBeaconCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24590,13 +24889,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public Su dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxBeaconRequestCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxBeaconRequestCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24654,13 +24954,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxOtherCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxOtherCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24718,13 +25019,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxRetryCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxRetryCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24782,13 +25084,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : pu dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24846,13 +25149,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24910,13 +25214,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxErrCcaCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxErrCcaCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24974,13 +25279,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxErrAbortCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxErrAbortCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25038,13 +25344,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public S dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxErrBusyChannelCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxErrBusyChannelCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25102,13 +25409,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxTotalCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxTotalCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25166,13 +25474,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxUnicastCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxUnicastCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25230,13 +25539,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxBroadcastCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxBroadcastCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25294,13 +25604,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxDataCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxDataCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25358,13 +25669,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxDataPollCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxDataPollCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25422,13 +25734,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxBeaconCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxBeaconCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25486,13 +25799,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public Su dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxBeaconRequestCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxBeaconRequestCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25550,13 +25864,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxOtherCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxOtherCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25614,13 +25929,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxAddressFilteredCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxAddressFilteredCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25678,13 +25994,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxDestAddrFilteredCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxDestAddrFilteredCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25742,13 +26059,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxDuplicatedCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxDuplicatedCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25806,13 +26124,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxErrNoFrameCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxErrNoFrameCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25870,13 +26189,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : publ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxErrUnknownNeighborCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25934,13 +26254,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : publi dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxErrInvalidSrcAddrCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25998,13 +26319,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxErrSecCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxErrSecCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26062,13 +26384,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxErrFcsCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxErrFcsCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26126,13 +26449,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRxErrOtherCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRxErrOtherCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26190,13 +26514,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActiveTimestampWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActiveTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26254,13 +26579,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePendingTimestampWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePendingTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26318,13 +26644,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribut dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26383,13 +26710,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSecurityPolicyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSecurityPolicyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26447,13 +26775,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeChannelPage0MaskWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeChannelPage0MaskWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26512,13 +26841,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : p dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOperationalDatasetComponentsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOperationalDatasetComponentsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26577,13 +26907,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActiveNetworkFaultsListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActiveNetworkFaultsListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26641,13 +26972,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public Su dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26705,13 +27037,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public Sub dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26769,13 +27102,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26833,13 +27167,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsFeatureMap : public SubscribeAtt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26897,13 +27232,14 @@ class SubscribeAttributeThreadNetworkDiagnosticsClusterRevision : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27035,13 +27371,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBssidWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBssidWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27099,13 +27436,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAtt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSecurityTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSecurityTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27163,13 +27501,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWiFiVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWiFiVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27227,13 +27566,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeChannelNumberWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeChannelNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27291,13 +27631,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRssiWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRssiWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27355,13 +27696,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBeaconLostCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBeaconLostCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27419,13 +27761,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBeaconRxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBeaconRxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27483,13 +27826,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public Su dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePacketMulticastRxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePacketMulticastRxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27547,13 +27891,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public Su dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePacketMulticastTxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePacketMulticastTxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27611,13 +27956,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public Subs dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePacketUnicastRxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePacketUnicastRxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27675,13 +28021,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public Subs dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePacketUnicastTxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePacketUnicastTxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27739,13 +28086,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentMaxRateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentMaxRateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27803,13 +28151,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAtt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOverrunCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOverrunCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27867,13 +28216,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public Subs dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27931,13 +28281,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27995,13 +28346,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28059,13 +28411,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28123,13 +28476,14 @@ class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28254,13 +28608,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPHYRate : public SubscribeAttr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePHYRateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePHYRateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28318,13 +28673,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFullDuplexWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFullDuplexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28382,13 +28738,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePacketRxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePacketRxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28446,13 +28803,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePacketTxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePacketTxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28510,13 +28868,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTxErrCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTxErrCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28574,13 +28933,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCollisionCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCollisionCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28638,13 +28998,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOverrunCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOverrunCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28702,13 +29063,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCarrierDetectWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCarrierDetectWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28766,13 +29128,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTimeSinceResetWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTimeSinceResetWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28830,13 +29193,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28894,13 +29258,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public S dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28958,13 +29323,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29022,13 +29388,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29086,13 +29453,14 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29186,13 +29554,14 @@ class SubscribeAttributeBridgedDeviceBasicVendorName : public SubscribeAttribute MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeVendorNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeVendorNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29252,13 +29621,14 @@ class SubscribeAttributeBridgedDeviceBasicVendorID : public SubscribeAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeVendorIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeVendorIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29318,13 +29688,14 @@ class SubscribeAttributeBridgedDeviceBasicProductName : public SubscribeAttribut MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeProductNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeProductNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29426,13 +29797,14 @@ class SubscribeAttributeBridgedDeviceBasicNodeLabel : public SubscribeAttribute MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNodeLabelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNodeLabelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29492,13 +29864,14 @@ class SubscribeAttributeBridgedDeviceBasicHardwareVersion : public SubscribeAttr MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeHardwareVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeHardwareVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29558,13 +29931,14 @@ class SubscribeAttributeBridgedDeviceBasicHardwareVersionString : public Subscri MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeHardwareVersionStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeHardwareVersionStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29624,13 +29998,14 @@ class SubscribeAttributeBridgedDeviceBasicSoftwareVersion : public SubscribeAttr MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSoftwareVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSoftwareVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29690,13 +30065,14 @@ class SubscribeAttributeBridgedDeviceBasicSoftwareVersionString : public Subscri MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSoftwareVersionStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSoftwareVersionStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29756,13 +30132,14 @@ class SubscribeAttributeBridgedDeviceBasicManufacturingDate : public SubscribeAt MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeManufacturingDateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeManufacturingDateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29822,13 +30199,14 @@ class SubscribeAttributeBridgedDeviceBasicPartNumber : public SubscribeAttribute MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePartNumberWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePartNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29888,13 +30266,14 @@ class SubscribeAttributeBridgedDeviceBasicProductURL : public SubscribeAttribute MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeProductURLWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeProductURLWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29954,13 +30333,14 @@ class SubscribeAttributeBridgedDeviceBasicProductLabel : public SubscribeAttribu MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeProductLabelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeProductLabelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30020,13 +30400,14 @@ class SubscribeAttributeBridgedDeviceBasicSerialNumber : public SubscribeAttribu MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSerialNumberWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSerialNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30086,13 +30467,14 @@ class SubscribeAttributeBridgedDeviceBasicReachable : public SubscribeAttribute MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeReachableWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeReachableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30152,13 +30534,14 @@ class SubscribeAttributeBridgedDeviceBasicUniqueID : public SubscribeAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUniqueIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUniqueIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30218,13 +30601,14 @@ class SubscribeAttributeBridgedDeviceBasicGeneratedCommandList : public Subscrib MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30284,13 +30668,14 @@ class SubscribeAttributeBridgedDeviceBasicAcceptedCommandList : public Subscribe MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30350,13 +30735,14 @@ class SubscribeAttributeBridgedDeviceBasicAttributeList : public SubscribeAttrib MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30416,13 +30802,14 @@ class SubscribeAttributeBridgedDeviceBasicFeatureMap : public SubscribeAttribute MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30482,13 +30869,14 @@ class SubscribeAttributeBridgedDeviceBasicClusterRevision : public SubscribeAttr MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30573,13 +30961,14 @@ class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNumberOfPositionsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNumberOfPositionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30639,13 +31028,14 @@ class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentPositionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30705,13 +31095,14 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMultiPressMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMultiPressMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30771,13 +31162,14 @@ class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30837,13 +31229,14 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30903,13 +31296,14 @@ class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30969,13 +31363,14 @@ class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31035,13 +31430,14 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31260,13 +31656,14 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWindowStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWindowStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31324,13 +31721,14 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAdminFabricIndexWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAdminFabricIndexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31388,13 +31786,14 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAdminVendorIdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAdminVendorIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31452,13 +31851,14 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31516,13 +31916,14 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31580,13 +31981,14 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31644,13 +32046,14 @@ class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31708,13 +32111,14 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32177,7 +32581,9 @@ class ReadOperationalCredentialsNOCs : public ReadAttribute { MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } [cluster readAttributeNOCsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.NOCs response %@", [value description]); @@ -32205,13 +32611,14 @@ class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNOCsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNOCsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32244,7 +32651,9 @@ class ReadOperationalCredentialsFabrics : public ReadAttribute { MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } [cluster readAttributeFabricsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); @@ -32272,13 +32681,14 @@ class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribut dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFabricsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFabricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32336,13 +32746,14 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSupportedFabricsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSupportedFabricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32400,13 +32811,14 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCommissionedFabricsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCommissionedFabricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32464,13 +32876,14 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public S dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTrustedRootCertificatesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTrustedRootCertificatesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32528,13 +32941,14 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentFabricIndexWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentFabricIndexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32592,13 +33006,14 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Subs dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32656,13 +33071,14 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32720,13 +33136,14 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32784,13 +33201,14 @@ class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32848,13 +33266,14 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33148,7 +33567,9 @@ class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { endpoint:@(endpointId) queue:callbackQueue]; MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } [cluster readAttributeGroupKeyMapWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); @@ -33233,13 +33654,14 @@ class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribut MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGroupKeyMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGroupKeyMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33273,7 +33695,9 @@ class ReadGroupKeyManagementGroupTable : public ReadAttribute { endpoint:@(endpointId) queue:callbackQueue]; MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } [cluster readAttributeGroupTableWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); @@ -33302,13 +33726,14 @@ class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGroupTableWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGroupTableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33368,13 +33793,14 @@ class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeA MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxGroupsPerFabricWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxGroupsPerFabricWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33434,13 +33860,14 @@ class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public Subscri MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxGroupKeysPerFabricWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33500,13 +33927,14 @@ class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public Subscrib MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33566,13 +33994,14 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public Subscribe MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33632,13 +34061,14 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33698,13 +34128,14 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33764,13 +34195,14 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33846,13 +34278,14 @@ class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLabelListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLabelListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33912,13 +34345,14 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33978,13 +34412,14 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34044,13 +34479,14 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34110,13 +34546,14 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34176,13 +34613,14 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34315,13 +34753,14 @@ class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLabelListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLabelListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34381,13 +34820,14 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34447,13 +34887,14 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34513,13 +34954,14 @@ class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34579,13 +35021,14 @@ class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34645,13 +35088,14 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34728,13 +35172,14 @@ class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeStateValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeStateValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34794,13 +35239,14 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34860,13 +35306,14 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttrib MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34926,13 +35373,14 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34992,13 +35440,14 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35058,13 +35507,14 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35192,13 +35642,14 @@ class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDescriptionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDescriptionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35258,13 +35709,14 @@ class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeStandardNamespaceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeStandardNamespaceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35324,13 +35776,14 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSupportedModesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35390,13 +35843,14 @@ class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35496,13 +35950,14 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeStartUpModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35602,13 +36057,14 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOnModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35668,13 +36124,14 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35734,13 +36191,14 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35800,13 +36258,14 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35866,13 +36325,14 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35932,13 +36392,14 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37033,13 +37494,14 @@ class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLockStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLockStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37099,13 +37561,14 @@ class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLockTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLockTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37165,13 +37628,14 @@ class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActuatorEnabledWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActuatorEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37231,13 +37695,14 @@ class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDoorStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDoorStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37337,13 +37802,14 @@ class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDoorOpenEventsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDoorOpenEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37443,13 +37909,14 @@ class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDoorClosedEventsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDoorClosedEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37549,13 +38016,14 @@ class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOpenPeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOpenPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37615,13 +38083,14 @@ class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAt MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNumberOfTotalUsersSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37681,13 +38150,14 @@ class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttr MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNumberOfPINUsersSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37747,13 +38217,14 @@ class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAtt MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNumberOfRFIDUsersSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37814,14 +38285,14 @@ class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : publi MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster - subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37882,14 +38353,14 @@ class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : publi MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster - subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37950,13 +38421,14 @@ class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public Subsc MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38016,13 +38488,14 @@ class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxPINCodeLengthWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxPINCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38082,13 +38555,14 @@ class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinPINCodeLengthWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinPINCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38148,13 +38622,14 @@ class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxRFIDCodeLengthWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxRFIDCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38214,13 +38689,14 @@ class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinRFIDCodeLengthWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinRFIDCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38280,13 +38756,14 @@ class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribu MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCredentialRulesSupportWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCredentialRulesSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38347,13 +38824,14 @@ class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public Sub MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38455,13 +38933,14 @@ class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLanguageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLanguageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38561,13 +39040,14 @@ class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLEDSettingsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLEDSettingsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38667,13 +39147,14 @@ class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAutoRelockTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAutoRelockTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38773,13 +39254,14 @@ class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSoundVolumeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSoundVolumeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38879,13 +39361,14 @@ class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOperatingModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOperatingModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38945,13 +39428,14 @@ class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttrib MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSupportedOperatingModesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSupportedOperatingModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39011,13 +39495,14 @@ class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeA MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDefaultConfigurationRegisterWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDefaultConfigurationRegisterWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39117,13 +39602,14 @@ class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribu MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEnableLocalProgrammingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEnableLocalProgrammingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39223,13 +39709,14 @@ class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribut MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEnableOneTouchLockingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEnableOneTouchLockingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39329,13 +39816,14 @@ class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribut MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEnableInsideStatusLEDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEnableInsideStatusLEDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39435,13 +39923,14 @@ class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttrib MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEnablePrivacyModeButtonWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEnablePrivacyModeButtonWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39541,13 +40030,14 @@ class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttri MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLocalProgrammingFeaturesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLocalProgrammingFeaturesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39647,13 +40137,14 @@ class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWrongCodeEntryLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWrongCodeEntryLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39754,13 +40245,14 @@ class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeA MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUserCodeTemporaryDisableTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39860,13 +40352,14 @@ class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSendPINOverTheAirWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSendPINOverTheAirWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39967,13 +40460,14 @@ class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeA MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRequirePINforRemoteOperationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRequirePINforRemoteOperationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40073,13 +40567,14 @@ class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeExpiringUserTimeoutWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeExpiringUserTimeoutWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40139,13 +40634,14 @@ class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40205,13 +40701,14 @@ class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40271,13 +40768,14 @@ class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40337,13 +40835,14 @@ class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40403,13 +40902,14 @@ class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40826,13 +41326,14 @@ class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40892,13 +41393,14 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public Subscribe MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePhysicalClosedLimitLiftWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePhysicalClosedLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40958,13 +41460,14 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public Subscribe MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePhysicalClosedLimitTiltWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePhysicalClosedLimitTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41024,13 +41527,14 @@ class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttr MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentPositionLiftWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentPositionLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41090,13 +41594,14 @@ class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttr MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentPositionTiltWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentPositionTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41156,13 +41661,14 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeA MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNumberOfActuationsLiftWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNumberOfActuationsLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41222,13 +41728,14 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeA MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNumberOfActuationsTiltWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNumberOfActuationsTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41288,13 +41795,14 @@ class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeConfigStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeConfigStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41354,13 +41862,14 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public Sub MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentPositionLiftPercentageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41420,13 +41929,14 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public Sub MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentPositionTiltPercentageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41486,13 +41996,14 @@ class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttrib MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOperationalStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOperationalStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41553,13 +42064,14 @@ class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public S MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTargetPositionLiftPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41620,13 +42132,14 @@ class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public S MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTargetPositionTiltPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41686,13 +42199,14 @@ class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEndProductTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEndProductTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41753,13 +42267,14 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentPositionLiftPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41820,13 +42335,14 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentPositionTiltPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41886,13 +42402,14 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeA MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInstalledOpenLimitLiftWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInstalledOpenLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41952,13 +42469,14 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public Subscrib MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInstalledClosedLimitLiftWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInstalledClosedLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42018,13 +42536,14 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeA MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInstalledOpenLimitTiltWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInstalledOpenLimitTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42084,13 +42603,14 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public Subscrib MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInstalledClosedLimitTiltWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInstalledClosedLimitTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42190,13 +42710,14 @@ class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42256,13 +42777,14 @@ class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSafetyStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSafetyStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42322,13 +42844,14 @@ class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAtt MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42388,13 +42911,14 @@ class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttr MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42454,13 +42978,14 @@ class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42520,13 +43045,14 @@ class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42586,13 +43112,14 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42768,13 +43295,14 @@ class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttri MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBarrierMovingStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBarrierMovingStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42834,13 +43362,14 @@ class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttr MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBarrierSafetyStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBarrierSafetyStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42900,13 +43429,14 @@ class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttr MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBarrierCapabilitiesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBarrierCapabilitiesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43006,13 +43536,14 @@ class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttrib MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBarrierOpenEventsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBarrierOpenEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43112,13 +43643,14 @@ class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttri MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBarrierCloseEventsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBarrierCloseEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43219,13 +43751,14 @@ class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public Subscrib MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBarrierCommandOpenEventsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBarrierCommandOpenEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43326,13 +43859,14 @@ class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public Subscri MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBarrierCommandCloseEventsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBarrierCommandCloseEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43432,13 +43966,14 @@ class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttrib MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBarrierOpenPeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBarrierOpenPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43538,13 +44073,14 @@ class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttri MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBarrierClosePeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBarrierClosePeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43604,13 +44140,14 @@ class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribut MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBarrierPositionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBarrierPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43670,13 +44207,14 @@ class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAtt MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43736,13 +44274,14 @@ class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttr MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43802,13 +44341,14 @@ class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43868,13 +44408,14 @@ class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43934,13 +44475,14 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44053,13 +44595,14 @@ class SubscribeAttributePumpConfigurationAndControlMaxPressure : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxPressureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44117,13 +44660,14 @@ class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxSpeedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44181,13 +44725,14 @@ class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAtt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxFlowWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44245,13 +44790,14 @@ class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public Sub dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinConstPressureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinConstPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44309,13 +44855,14 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxConstPressureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxConstPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44373,13 +44920,14 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinCompPressureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinCompPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44437,13 +44985,14 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxCompPressureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxCompPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44501,13 +45050,14 @@ class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinConstSpeedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinConstSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44565,13 +45115,14 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxConstSpeedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxConstSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44629,13 +45180,14 @@ class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinConstFlowWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinConstFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44693,13 +45245,14 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxConstFlowWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxConstFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44757,13 +45310,14 @@ class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinConstTempWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinConstTempWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44821,13 +45375,14 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxConstTempWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxConstTempWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44885,13 +45440,14 @@ class SubscribeAttributePumpConfigurationAndControlPumpStatus : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePumpStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePumpStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44949,13 +45505,14 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEffectiveOperationModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEffectiveOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45013,13 +45570,14 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEffectiveControlModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEffectiveControlModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45077,13 +45635,14 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCapacityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45141,13 +45700,14 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSpeedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45245,13 +45805,14 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLifetimeRunningHoursWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLifetimeRunningHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45309,13 +45870,14 @@ class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45414,13 +45976,14 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLifetimeEnergyConsumedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLifetimeEnergyConsumedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45517,13 +46080,14 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOperationModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45620,13 +46184,14 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeControlModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeControlModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45684,13 +46249,14 @@ class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45748,13 +46314,14 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45812,13 +46379,14 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45876,13 +46444,14 @@ class SubscribeAttributePumpConfigurationAndControlFeatureMap : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45940,13 +46509,14 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46290,13 +46860,14 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLocalTemperatureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLocalTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46356,13 +46927,14 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOutdoorTemperatureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOutdoorTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46422,13 +46994,14 @@ class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOccupancyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOccupancyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46488,13 +47061,14 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAbsMinHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46554,13 +47128,14 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAbsMaxHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46620,13 +47195,14 @@ class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttr MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAbsMinCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46686,13 +47262,14 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAbsMaxCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46752,13 +47329,14 @@ class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePICoolingDemandWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePICoolingDemandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46818,13 +47396,14 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePIHeatingDemandWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePIHeatingDemandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46925,13 +47504,14 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeHVACSystemTypeConfigurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47032,13 +47612,14 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLocalTemperatureCalibrationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLocalTemperatureCalibrationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47138,13 +47719,14 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOccupiedCoolingSetpointWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOccupiedCoolingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47244,13 +47826,14 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOccupiedHeatingSetpointWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOccupiedHeatingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47351,13 +47934,14 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUnoccupiedCoolingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47458,13 +48042,14 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUnoccupiedHeatingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47564,13 +48149,14 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinHeatSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47670,13 +48256,14 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxHeatSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47776,13 +48363,14 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinCoolSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47882,13 +48470,14 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxCoolSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47988,13 +48577,14 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinSetpointDeadBandWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinSetpointDeadBandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48094,13 +48684,14 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRemoteSensingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRemoteSensingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48201,13 +48792,14 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeControlSequenceOfOperationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeControlSequenceOfOperationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48307,13 +48899,14 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSystemModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSystemModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48373,13 +48966,14 @@ class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttrib MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeThermostatRunningModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeThermostatRunningModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48439,13 +49033,14 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeStartOfWeekWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeStartOfWeekWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48505,13 +49100,14 @@ class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAt MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNumberOfWeeklyTransitionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48571,13 +49167,14 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNumberOfDailyTransitionsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNumberOfDailyTransitionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48677,13 +49274,14 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTemperatureSetpointHoldWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTemperatureSetpointHoldWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48786,13 +49384,14 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTemperatureSetpointHoldDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48896,13 +49495,14 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeThermostatProgrammingOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48962,13 +49562,14 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeThermostatRunningStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeThermostatRunningStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49028,13 +49629,14 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSetpointChangeSourceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSetpointChangeSourceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49094,13 +49696,14 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSetpointChangeAmountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSetpointChangeAmountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49160,13 +49763,14 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSetpointChangeSourceTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49266,13 +49870,14 @@ class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOccupiedSetbackWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOccupiedSetbackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49332,13 +49937,14 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOccupiedSetbackMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOccupiedSetbackMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49398,13 +50004,14 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOccupiedSetbackMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOccupiedSetbackMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49504,13 +50111,14 @@ class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUnoccupiedSetbackWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUnoccupiedSetbackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49570,13 +50178,14 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUnoccupiedSetbackMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUnoccupiedSetbackMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49636,13 +50245,14 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUnoccupiedSetbackMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49742,13 +50352,14 @@ class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEmergencyHeatDeltaWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEmergencyHeatDeltaWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49848,13 +50459,14 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeACTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeACTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49954,13 +50566,14 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeACCapacityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeACCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50060,13 +50673,14 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeACRefrigerantTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeACRefrigerantTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50166,13 +50780,14 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeACCompressorTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeACCompressorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50272,13 +50887,14 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeACErrorCodeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeACErrorCodeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50378,13 +50994,14 @@ class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeACLouverPositionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeACLouverPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50444,13 +51061,14 @@ class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeACCoilTemperatureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeACCoilTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50550,13 +51168,14 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeACCapacityformatWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeACCapacityformatWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50616,13 +51235,14 @@ class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribu MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50682,13 +51302,14 @@ class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribut MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50748,13 +51369,14 @@ class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50814,13 +51436,14 @@ class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50880,13 +51503,14 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51012,13 +51636,14 @@ class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFanModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFanModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51118,13 +51743,14 @@ class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFanModeSequenceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFanModeSequenceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51224,13 +51850,14 @@ class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePercentSettingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePercentSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51290,13 +51917,14 @@ class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePercentCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePercentCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51356,13 +51984,14 @@ class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSpeedMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSpeedMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51462,13 +52091,14 @@ class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSpeedSettingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSpeedSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51528,13 +52158,14 @@ class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSpeedCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSpeedCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51594,13 +52225,14 @@ class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRockSupportWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRockSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51700,13 +52332,14 @@ class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRockSettingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRockSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51766,13 +52399,14 @@ class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWindSupportWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWindSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51872,13 +52506,14 @@ class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWindSettingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWindSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51938,13 +52573,14 @@ class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribu MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52004,13 +52640,14 @@ class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribut MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52070,13 +52707,14 @@ class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52136,13 +52774,14 @@ class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52202,13 +52841,14 @@ class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52331,13 +52971,14 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMo [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTemperatureDisplayModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTemperatureDisplayModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52441,13 +53082,14 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : publ [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeKeypadLockoutWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeKeypadLockoutWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52552,13 +53194,14 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingV [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeScheduleProgrammingVisibilityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52620,13 +53263,14 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52688,13 +53332,14 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52756,13 +53401,14 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : publ [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52824,13 +53470,14 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52892,13 +53539,14 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : pu [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54062,13 +54710,14 @@ class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentHueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54128,13 +54777,14 @@ class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribut MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentSaturationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentSaturationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54194,13 +54844,14 @@ class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRemainingTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRemainingTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54260,13 +54911,14 @@ class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentXWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54326,13 +54978,14 @@ class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentYWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54392,13 +55045,14 @@ class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribut MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDriftCompensationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDriftCompensationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54458,13 +55112,14 @@ class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCompensationTextWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCompensationTextWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54524,13 +55179,14 @@ class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAtt MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorTemperatureMiredsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorTemperatureMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54590,13 +55246,14 @@ class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54696,13 +55353,14 @@ class SubscribeAttributeColorControlOptions : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOptionsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOptionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54762,13 +55420,14 @@ class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribut MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNumberOfPrimariesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNumberOfPrimariesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54828,13 +55487,14 @@ class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary1XWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary1XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54894,13 +55554,14 @@ class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary1YWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary1YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54960,13 +55621,14 @@ class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribut MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary1IntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary1IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55026,13 +55688,14 @@ class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary2XWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary2XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55092,13 +55755,14 @@ class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary2YWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary2YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55158,13 +55822,14 @@ class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribut MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary2IntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary2IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55224,13 +55889,14 @@ class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary3XWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary3XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55290,13 +55956,14 @@ class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary3YWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary3YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55356,13 +56023,14 @@ class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribut MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary3IntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary3IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55422,13 +56090,14 @@ class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary4XWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary4XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55488,13 +56157,14 @@ class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary4YWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary4YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55554,13 +56224,14 @@ class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribut MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary4IntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary4IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55620,13 +56291,14 @@ class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary5XWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary5XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55686,13 +56358,14 @@ class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary5YWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary5YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55752,13 +56425,14 @@ class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribut MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary5IntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary5IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55818,13 +56492,14 @@ class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary6XWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary6XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55884,13 +56559,14 @@ class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary6YWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary6YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55950,13 +56626,14 @@ class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribut MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePrimary6IntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePrimary6IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56056,13 +56733,14 @@ class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWhitePointXWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWhitePointXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56162,13 +56840,14 @@ class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeWhitePointYWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeWhitePointYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56268,13 +56947,14 @@ class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorPointRXWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorPointRXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56374,13 +57054,14 @@ class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorPointRYWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorPointRYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56480,13 +57161,14 @@ class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttri MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorPointRIntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorPointRIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56586,13 +57268,14 @@ class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorPointGXWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorPointGXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56692,13 +57375,14 @@ class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorPointGYWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorPointGYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56798,13 +57482,14 @@ class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttri MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorPointGIntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorPointGIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56904,13 +57589,14 @@ class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorPointBXWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorPointBXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57010,13 +57696,14 @@ class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorPointBYWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorPointBYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57116,13 +57803,14 @@ class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttri MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorPointBIntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorPointBIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57182,13 +57870,14 @@ class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribu MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEnhancedCurrentHueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEnhancedCurrentHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57248,13 +57937,14 @@ class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribut MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEnhancedColorModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEnhancedColorModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57314,13 +58004,14 @@ class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorLoopActiveWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorLoopActiveWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57380,13 +58071,14 @@ class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribu MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorLoopDirectionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorLoopDirectionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57446,13 +58138,14 @@ class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorLoopTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorLoopTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57512,13 +58205,14 @@ class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public Subscribe MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorLoopStartEnhancedHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57578,13 +58272,14 @@ class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public Subscrib MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorLoopStoredEnhancedHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57644,13 +58339,14 @@ class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribut MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorCapabilitiesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorCapabilitiesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57710,13 +58406,14 @@ class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public Subscrib MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorTempPhysicalMinMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57776,13 +58473,14 @@ class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public Subscrib MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeColorTempPhysicalMaxMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57843,13 +58541,14 @@ class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public Sub MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57951,13 +58650,14 @@ class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public Subsc MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeStartUpColorTemperatureMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58017,13 +58717,14 @@ class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttri MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58083,13 +58784,14 @@ class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttrib MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58149,13 +58851,14 @@ class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58215,13 +58918,14 @@ class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58281,13 +58985,14 @@ class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58376,13 +59081,14 @@ class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeA MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePhysicalMinLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePhysicalMinLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58442,13 +59148,14 @@ class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeA MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePhysicalMaxLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePhysicalMaxLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58508,13 +59215,14 @@ class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttr MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBallastStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBallastStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58614,13 +59322,14 @@ class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58720,13 +59429,14 @@ class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58827,13 +59537,14 @@ class SubscribeAttributeBallastConfigurationIntrinsicBalanceFactor : public Subs MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeIntrinsicBalanceFactorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeIntrinsicBalanceFactorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58934,13 +59645,14 @@ class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public Sub MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBallastFactorAdjustmentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBallastFactorAdjustmentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59000,13 +59712,14 @@ class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttri MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLampQuantityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLampQuantityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59108,13 +59821,14 @@ class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLampTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLampTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59216,13 +59930,14 @@ class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeA MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLampManufacturerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLampManufacturerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59322,13 +60037,14 @@ class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAtt MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLampRatedHoursWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLampRatedHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59428,13 +60144,14 @@ class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttr MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLampBurnHoursWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLampBurnHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59534,13 +60251,14 @@ class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttr MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLampAlarmModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLampAlarmModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59641,13 +60359,14 @@ class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public Subs MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLampBurnHoursTripPointWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLampBurnHoursTripPointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59707,13 +60426,14 @@ class SubscribeAttributeBallastConfigurationGeneratedCommandList : public Subscr MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59773,13 +60493,14 @@ class SubscribeAttributeBallastConfigurationAcceptedCommandList : public Subscri MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59839,13 +60560,14 @@ class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttr MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59905,13 +60627,14 @@ class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribu MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59971,13 +60694,14 @@ class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAt MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60055,13 +60779,14 @@ class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60119,13 +60844,14 @@ class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60183,13 +60909,14 @@ class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60247,13 +60974,14 @@ class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeToleranceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60311,13 +61039,14 @@ class SubscribeAttributeIlluminanceMeasurementLightSensorType : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLightSensorTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLightSensorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60375,13 +61104,14 @@ class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public Subs dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60439,13 +61169,14 @@ class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60503,13 +61234,14 @@ class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60567,13 +61299,14 @@ class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60631,13 +61364,14 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60714,13 +61448,14 @@ class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60778,13 +61513,14 @@ class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60842,13 +61578,14 @@ class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public Subscrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60906,13 +61643,14 @@ class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttrib dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeToleranceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60970,13 +61708,14 @@ class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public Subs dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61034,13 +61773,14 @@ class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public Subsc dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61098,13 +61838,14 @@ class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61162,13 +61903,14 @@ class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61226,13 +61968,14 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61316,13 +62059,14 @@ class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttri MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61382,13 +62126,14 @@ class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAt MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61448,13 +62193,14 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAt MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61514,13 +62260,14 @@ class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeToleranceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61580,13 +62327,14 @@ class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribu MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeScaledValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61646,13 +62394,14 @@ class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttr MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinScaledValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61712,13 +62461,14 @@ class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttr MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxScaledValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61778,13 +62528,14 @@ class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAtt MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeScaledToleranceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeScaledToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61844,13 +62595,14 @@ class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeScaleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeScaleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61910,13 +62662,14 @@ class SubscribeAttributePressureMeasurementGeneratedCommandList : public Subscri MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61976,13 +62729,14 @@ class SubscribeAttributePressureMeasurementAcceptedCommandList : public Subscrib MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62042,13 +62796,14 @@ class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttri MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62108,13 +62863,14 @@ class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribut MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62174,13 +62930,14 @@ class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAtt MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62259,13 +63016,14 @@ class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62325,13 +63083,14 @@ class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttrib MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62391,13 +63150,14 @@ class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttrib MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62457,13 +63217,14 @@ class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeToleranceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62523,13 +63284,14 @@ class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAt MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62589,13 +63351,14 @@ class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAtt MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62655,13 +63418,14 @@ class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62721,13 +63485,14 @@ class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62787,13 +63552,14 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribu MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62870,13 +63636,14 @@ class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62934,13 +63701,14 @@ class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public Sub dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMinMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62998,13 +63766,14 @@ class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public Sub dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMaxMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63062,13 +63831,14 @@ class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeA dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeToleranceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63126,13 +63896,14 @@ class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63190,13 +63961,14 @@ class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63254,13 +64026,14 @@ class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public Subscr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63318,13 +64091,14 @@ class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public Subscribe dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63382,13 +64156,14 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63475,13 +64250,14 @@ class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOccupancyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOccupancyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63541,13 +64317,14 @@ class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAt MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOccupancySensorTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOccupancySensorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63607,13 +64384,14 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Subsc MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOccupancySensorTypeBitmapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63715,13 +64493,14 @@ class SubscribeAttributeOccupancySensingPirOccupiedToUnoccupiedDelay : public Su MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePirOccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63823,13 +64602,14 @@ class SubscribeAttributeOccupancySensingPirUnoccupiedToOccupiedDelay : public Su MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePirUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63932,13 +64712,14 @@ class SubscribeAttributeOccupancySensingPirUnoccupiedToOccupiedThreshold : publi MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePirUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64042,13 +64823,14 @@ class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : pu MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64152,13 +64934,14 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : pu MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64263,14 +65046,14 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster - subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64375,14 +65158,14 @@ class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster - subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64487,14 +65270,14 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster - subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64598,15 +65381,14 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThres MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster - subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:[NSNumber - numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64666,13 +65448,14 @@ class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeA MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64732,13 +65515,14 @@ class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAt MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64798,13 +65582,14 @@ class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribut MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64864,13 +65649,14 @@ class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64930,13 +65716,14 @@ class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttrib MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65012,13 +65799,14 @@ class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMACAddressWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMACAddressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65078,13 +65866,14 @@ class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribut MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65144,13 +65933,14 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65210,13 +66000,14 @@ class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65276,13 +66067,14 @@ class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65342,13 +66134,14 @@ class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65573,13 +66366,14 @@ class SubscribeAttributeChannelChannelList : public SubscribeAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeChannelListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeChannelListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65639,13 +66433,14 @@ class SubscribeAttributeChannelLineup : public SubscribeAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLineupWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLineupWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65706,13 +66501,14 @@ class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentChannelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentChannelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65772,13 +66568,14 @@ class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65838,13 +66635,14 @@ class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65904,13 +66702,14 @@ class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65970,13 +66769,14 @@ class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66036,13 +66836,14 @@ class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66176,13 +66977,14 @@ class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTargetListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTargetListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66242,13 +67044,14 @@ class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentTargetWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentTargetWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66308,13 +67111,14 @@ class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAt MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66374,13 +67178,14 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAtt MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66440,13 +67245,14 @@ class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66506,13 +67312,14 @@ class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66572,13 +67379,14 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67172,13 +67980,14 @@ class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67238,13 +68047,14 @@ class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeStartTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeStartTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67304,13 +68114,14 @@ class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDurationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67371,13 +68182,14 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSampledPositionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSampledPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67437,13 +68249,14 @@ class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePlaybackSpeedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePlaybackSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67503,13 +68316,14 @@ class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSeekRangeEndWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSeekRangeEndWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67569,13 +68383,14 @@ class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSeekRangeStartWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSeekRangeStartWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67635,13 +68450,14 @@ class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttr MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67701,13 +68517,14 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttri MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67767,13 +68584,14 @@ class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67833,13 +68651,14 @@ class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67899,13 +68718,14 @@ class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68168,13 +68988,14 @@ class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInputListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInputListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68234,13 +69055,14 @@ class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentInputWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentInputWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68300,13 +69122,14 @@ class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribu MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68366,13 +69189,14 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribut MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68432,13 +69256,14 @@ class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68498,13 +69323,14 @@ class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68564,13 +69390,14 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68689,13 +69516,14 @@ class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68755,13 +69583,14 @@ class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68821,13 +69650,14 @@ class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68887,13 +69717,14 @@ class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68953,13 +69784,14 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69082,13 +69914,14 @@ class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttrib MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69148,13 +69981,14 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribu MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69214,13 +70048,14 @@ class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69280,13 +70115,14 @@ class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69346,13 +70182,14 @@ class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69759,13 +70596,14 @@ class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptHeaderWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptHeaderWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69867,13 +70705,14 @@ class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public Subs MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeSupportedStreamingProtocolsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeSupportedStreamingProtocolsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69933,13 +70772,14 @@ class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAt MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69999,13 +70839,14 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAtt MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70065,13 +70906,14 @@ class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70131,13 +70973,14 @@ class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70197,13 +71040,14 @@ class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribu MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70378,13 +71222,14 @@ class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOutputListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOutputListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70444,13 +71289,14 @@ class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentOutputWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentOutputWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70510,13 +71356,14 @@ class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttrib MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70576,13 +71423,14 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribu MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70642,13 +71490,14 @@ class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70708,13 +71557,14 @@ class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70774,13 +71624,14 @@ class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71028,13 +71879,14 @@ class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribu MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCatalogListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCatalogListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71153,13 +72005,14 @@ class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribut MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentAppWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentAppWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71219,13 +72072,14 @@ class SubscribeAttributeApplicationLauncherGeneratedCommandList : public Subscri MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71285,13 +72139,14 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public Subscrib MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71351,13 +72206,14 @@ class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttri MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71417,13 +72273,14 @@ class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribut MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71483,13 +72340,14 @@ class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAtt MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71572,13 +72430,14 @@ class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeVendorNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeVendorNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71638,13 +72497,14 @@ class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeVendorIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeVendorIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71704,13 +72564,14 @@ class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttrib MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeApplicationNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeApplicationNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71770,13 +72631,14 @@ class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeProductIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeProductIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71837,13 +72699,14 @@ class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeApplicationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeApplicationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71903,13 +72766,14 @@ class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71969,13 +72833,14 @@ class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAtt MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeApplicationVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeApplicationVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72035,13 +72900,14 @@ class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttr MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAllowedVendorListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAllowedVendorListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72101,13 +72967,14 @@ class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeA MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72167,13 +73034,14 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAt MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72233,13 +73101,14 @@ class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribut MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72299,13 +73168,14 @@ class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72365,13 +73235,14 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72594,13 +73465,14 @@ class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttri MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72660,13 +73532,14 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttrib MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72726,13 +73599,14 @@ class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72792,13 +73666,14 @@ class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72858,13 +73733,14 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73162,13 +74038,14 @@ class SubscribeAttributeElectricalMeasurementMeasurementType : public SubscribeA MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasurementTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasurementTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73228,13 +74105,14 @@ class SubscribeAttributeElectricalMeasurementDcVoltage : public SubscribeAttribu MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73294,13 +74172,14 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMin : public SubscribeAttr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcVoltageMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcVoltageMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73360,13 +74239,14 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMax : public SubscribeAttr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcVoltageMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcVoltageMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73426,13 +74306,14 @@ class SubscribeAttributeElectricalMeasurementDcCurrent : public SubscribeAttribu MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73492,13 +74373,14 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMin : public SubscribeAttr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcCurrentMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcCurrentMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73558,13 +74440,14 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMax : public SubscribeAttr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcCurrentMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcCurrentMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73624,13 +74507,14 @@ class SubscribeAttributeElectricalMeasurementDcPower : public SubscribeAttribute MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcPowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73690,13 +74574,14 @@ class SubscribeAttributeElectricalMeasurementDcPowerMin : public SubscribeAttrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcPowerMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcPowerMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73756,13 +74641,14 @@ class SubscribeAttributeElectricalMeasurementDcPowerMax : public SubscribeAttrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcPowerMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcPowerMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73822,13 +74708,14 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMultiplier : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcVoltageMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcVoltageMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73888,13 +74775,14 @@ class SubscribeAttributeElectricalMeasurementDcVoltageDivisor : public Subscribe MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcVoltageDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcVoltageDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73954,13 +74842,14 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMultiplier : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcCurrentMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcCurrentMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74020,13 +74909,14 @@ class SubscribeAttributeElectricalMeasurementDcCurrentDivisor : public Subscribe MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcCurrentDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcCurrentDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74086,13 +74976,14 @@ class SubscribeAttributeElectricalMeasurementDcPowerMultiplier : public Subscrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcPowerMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcPowerMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74152,13 +75043,14 @@ class SubscribeAttributeElectricalMeasurementDcPowerDivisor : public SubscribeAt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeDcPowerDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeDcPowerDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74218,13 +75110,14 @@ class SubscribeAttributeElectricalMeasurementAcFrequency : public SubscribeAttri MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcFrequencyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcFrequencyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74284,13 +75177,14 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMin : public SubscribeAt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcFrequencyMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcFrequencyMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74350,13 +75244,14 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMax : public SubscribeAt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcFrequencyMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcFrequencyMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74416,13 +75311,14 @@ class SubscribeAttributeElectricalMeasurementNeutralCurrent : public SubscribeAt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNeutralCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNeutralCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74482,13 +75378,14 @@ class SubscribeAttributeElectricalMeasurementTotalActivePower : public Subscribe MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTotalActivePowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTotalActivePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74548,13 +75445,14 @@ class SubscribeAttributeElectricalMeasurementTotalReactivePower : public Subscri MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTotalReactivePowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTotalReactivePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74614,13 +75512,14 @@ class SubscribeAttributeElectricalMeasurementTotalApparentPower : public Subscri MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTotalApparentPowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTotalApparentPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74680,13 +75579,14 @@ class SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent : public MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasured1stHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74746,13 +75646,14 @@ class SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent : public MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasured3rdHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74812,13 +75713,14 @@ class SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent : public MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasured5thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74878,13 +75780,14 @@ class SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent : public MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasured7thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74944,13 +75847,14 @@ class SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent : public MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasured9thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75010,13 +75914,14 @@ class SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent : publi MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasured11thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75077,13 +75982,14 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent : p MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75144,13 +76050,14 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : p MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75211,13 +76118,14 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent : p MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75278,13 +76186,14 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent : p MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75345,13 +76254,14 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent : p MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75412,13 +76322,14 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent : MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75478,13 +76389,14 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier : public Subs MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcFrequencyMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcFrequencyMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75544,13 +76456,14 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyDivisor : public Subscri MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcFrequencyDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcFrequencyDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75610,13 +76523,14 @@ class SubscribeAttributeElectricalMeasurementPowerMultiplier : public SubscribeA MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePowerMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePowerMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75676,13 +76590,14 @@ class SubscribeAttributeElectricalMeasurementPowerDivisor : public SubscribeAttr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePowerDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePowerDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75742,13 +76657,14 @@ class SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier : public MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeHarmonicCurrentMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75809,13 +76725,14 @@ class SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier : pu MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75875,13 +76792,14 @@ class SubscribeAttributeElectricalMeasurementInstantaneousVoltage : public Subsc MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInstantaneousVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInstantaneousVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75941,13 +76859,14 @@ class SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent : public S MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInstantaneousLineCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInstantaneousLineCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76007,13 +76926,14 @@ class SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent : public MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInstantaneousActiveCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInstantaneousActiveCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76073,13 +76993,14 @@ class SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent : publ MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInstantaneousReactiveCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76139,13 +77060,14 @@ class SubscribeAttributeElectricalMeasurementInstantaneousPower : public Subscri MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInstantaneousPowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInstantaneousPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76205,13 +77127,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltage : public SubscribeAttrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76271,13 +77194,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public SubscribeAtt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76337,13 +77261,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public SubscribeAtt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76403,13 +77328,14 @@ class SubscribeAttributeElectricalMeasurementRmsCurrent : public SubscribeAttrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76469,13 +77395,14 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMin : public SubscribeAtt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsCurrentMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsCurrentMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76535,13 +77462,14 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public SubscribeAtt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsCurrentMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsCurrentMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76601,13 +77529,14 @@ class SubscribeAttributeElectricalMeasurementActivePower : public SubscribeAttri MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActivePowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActivePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76667,13 +77596,14 @@ class SubscribeAttributeElectricalMeasurementActivePowerMin : public SubscribeAt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActivePowerMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActivePowerMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76733,13 +77663,14 @@ class SubscribeAttributeElectricalMeasurementActivePowerMax : public SubscribeAt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActivePowerMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActivePowerMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76799,13 +77730,14 @@ class SubscribeAttributeElectricalMeasurementReactivePower : public SubscribeAtt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeReactivePowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeReactivePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76865,13 +77797,14 @@ class SubscribeAttributeElectricalMeasurementApparentPower : public SubscribeAtt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeApparentPowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeApparentPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76931,13 +77864,14 @@ class SubscribeAttributeElectricalMeasurementPowerFactor : public SubscribeAttri MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePowerFactorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePowerFactorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77040,13 +77974,14 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77149,13 +78084,14 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter : pub MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAverageRmsUnderVoltageCounterWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77258,13 +78194,14 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod : publi MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77367,13 +78304,14 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod : publ MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77473,13 +78411,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageSagPeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageSagPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77580,13 +78519,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod : public Subs MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageSwellPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77646,13 +78586,14 @@ class SubscribeAttributeElectricalMeasurementAcVoltageMultiplier : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcVoltageMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcVoltageMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77712,13 +78653,14 @@ class SubscribeAttributeElectricalMeasurementAcVoltageDivisor : public Subscribe MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcVoltageDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcVoltageDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77778,13 +78720,14 @@ class SubscribeAttributeElectricalMeasurementAcCurrentMultiplier : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcCurrentMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcCurrentMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77844,13 +78787,14 @@ class SubscribeAttributeElectricalMeasurementAcCurrentDivisor : public Subscribe MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcCurrentDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcCurrentDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77910,13 +78854,14 @@ class SubscribeAttributeElectricalMeasurementAcPowerMultiplier : public Subscrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcPowerMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcPowerMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77976,13 +78921,14 @@ class SubscribeAttributeElectricalMeasurementAcPowerDivisor : public SubscribeAt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcPowerDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcPowerDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78082,13 +79028,14 @@ class SubscribeAttributeElectricalMeasurementOverloadAlarmsMask : public Subscri MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOverloadAlarmsMaskWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOverloadAlarmsMaskWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78148,13 +79095,14 @@ class SubscribeAttributeElectricalMeasurementVoltageOverload : public SubscribeA MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeVoltageOverloadWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeVoltageOverloadWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78214,13 +79162,14 @@ class SubscribeAttributeElectricalMeasurementCurrentOverload : public SubscribeA MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCurrentOverloadWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCurrentOverloadWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78321,13 +79270,14 @@ class SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask : public Subsc MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcOverloadAlarmsMaskWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78387,13 +79337,14 @@ class SubscribeAttributeElectricalMeasurementAcVoltageOverload : public Subscrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcVoltageOverloadWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcVoltageOverloadWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78453,13 +79404,14 @@ class SubscribeAttributeElectricalMeasurementAcCurrentOverload : public Subscrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcCurrentOverloadWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcCurrentOverloadWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78519,13 +79471,14 @@ class SubscribeAttributeElectricalMeasurementAcActivePowerOverload : public Subs MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcActivePowerOverloadWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcActivePowerOverloadWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78585,13 +79538,14 @@ class SubscribeAttributeElectricalMeasurementAcReactivePowerOverload : public Su MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcReactivePowerOverloadWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcReactivePowerOverloadWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78651,13 +79605,14 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage : public Subs MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAverageRmsOverVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAverageRmsOverVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78717,13 +79672,14 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage : public Sub MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAverageRmsUnderVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAverageRmsUnderVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78783,13 +79739,14 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage : public Subs MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsExtremeOverVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsExtremeOverVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78849,13 +79806,14 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage : public Sub MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsExtremeUnderVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78915,13 +79873,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSag : public SubscribeAtt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageSagWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageSagWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78981,13 +79940,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwell : public SubscribeA MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageSwellWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageSwellWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79047,13 +80007,14 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseB : public Subscrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLineCurrentPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLineCurrentPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79113,13 +80074,14 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActiveCurrentPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActiveCurrentPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79179,13 +80141,14 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB : public Subs MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeReactiveCurrentPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeReactiveCurrentPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79245,13 +80208,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB : public Subscribe MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltagePhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltagePhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79311,13 +80275,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageMinPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79377,13 +80342,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageMaxPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79443,13 +80409,14 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB : public Subscribe MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsCurrentPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsCurrentPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79509,13 +80476,14 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsCurrentMinPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79575,13 +80543,14 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsCurrentMaxPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79641,13 +80610,14 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseB : public Subscrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActivePowerPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActivePowerPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79707,13 +80677,14 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB : public Subsc MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActivePowerMinPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActivePowerMinPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79773,13 +80744,14 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB : public Subsc MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActivePowerMaxPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActivePowerMaxPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79839,13 +80811,14 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseB : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeReactivePowerPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeReactivePowerPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79905,13 +80878,14 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseB : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeApparentPowerPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeApparentPowerPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79971,13 +80945,14 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseB : public Subscrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePowerFactorPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePowerFactorPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80038,14 +81013,14 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster - subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80106,13 +81081,14 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80173,13 +81149,14 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80240,13 +81217,14 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80307,13 +81285,14 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80373,13 +81352,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB : public MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80439,13 +81419,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB : publi MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80505,13 +81486,14 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseC : public Subscrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLineCurrentPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLineCurrentPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80571,13 +81553,14 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActiveCurrentPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActiveCurrentPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80637,13 +81620,14 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC : public Subs MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeReactiveCurrentPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeReactiveCurrentPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80703,13 +81687,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC : public Subscribe MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltagePhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltagePhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80769,13 +81754,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageMinPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80835,13 +81821,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageMaxPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80901,13 +81888,14 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC : public Subscribe MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsCurrentPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsCurrentPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80967,13 +81955,14 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsCurrentMinPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81033,13 +82022,14 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsCurrentMaxPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81099,13 +82089,14 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseC : public Subscrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActivePowerPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActivePowerPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81165,13 +82156,14 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC : public Subsc MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActivePowerMinPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActivePowerMinPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81231,13 +82223,14 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC : public Subsc MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeActivePowerMaxPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeActivePowerMaxPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81297,13 +82290,14 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseC : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeReactivePowerPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeReactivePowerPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81363,13 +82357,14 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseC : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeApparentPowerPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeApparentPowerPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81429,13 +82424,14 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseC : public Subscrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributePowerFactorPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributePowerFactorPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81496,14 +82492,14 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster - subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81564,13 +82560,14 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81631,13 +82628,14 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81698,13 +82696,14 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81765,13 +82764,14 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81831,13 +82831,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC : public MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81897,13 +82898,14 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC : publi MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81963,13 +82965,14 @@ class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public Subsc MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -82029,13 +83032,14 @@ class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public Subscr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -82095,13 +83099,14 @@ class SubscribeAttributeElectricalMeasurementAttributeList : public SubscribeAtt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -82161,13 +83166,14 @@ class SubscribeAttributeElectricalMeasurementFeatureMap : public SubscribeAttrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -82227,13 +83233,14 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84019,13 +85026,14 @@ class SubscribeAttributeTestClusterBoolean : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBooleanWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBooleanWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84125,13 +85133,14 @@ class SubscribeAttributeTestClusterBitmap8 : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBitmap8WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBitmap8WithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84231,13 +85240,14 @@ class SubscribeAttributeTestClusterBitmap16 : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBitmap16WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBitmap16WithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84337,13 +85347,14 @@ class SubscribeAttributeTestClusterBitmap32 : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBitmap32WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBitmap32WithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84443,13 +85454,14 @@ class SubscribeAttributeTestClusterBitmap64 : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeBitmap64WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeBitmap64WithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84549,13 +85561,14 @@ class SubscribeAttributeTestClusterInt8u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt8uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt8uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84655,13 +85668,14 @@ class SubscribeAttributeTestClusterInt16u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt16uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt16uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84761,13 +85775,14 @@ class SubscribeAttributeTestClusterInt24u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt24uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt24uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84867,13 +85882,14 @@ class SubscribeAttributeTestClusterInt32u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt32uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt32uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84973,13 +85989,14 @@ class SubscribeAttributeTestClusterInt40u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt40uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt40uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85079,13 +86096,14 @@ class SubscribeAttributeTestClusterInt48u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt48uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt48uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85185,13 +86203,14 @@ class SubscribeAttributeTestClusterInt56u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt56uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt56uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85291,13 +86310,14 @@ class SubscribeAttributeTestClusterInt64u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt64uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt64uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85397,13 +86417,14 @@ class SubscribeAttributeTestClusterInt8s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt8sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt8sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85503,13 +86524,14 @@ class SubscribeAttributeTestClusterInt16s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt16sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt16sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85609,13 +86631,14 @@ class SubscribeAttributeTestClusterInt24s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt24sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt24sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85715,13 +86738,14 @@ class SubscribeAttributeTestClusterInt32s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt32sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt32sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85821,13 +86845,14 @@ class SubscribeAttributeTestClusterInt40s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt40sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt40sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85927,13 +86952,14 @@ class SubscribeAttributeTestClusterInt48s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt48sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt48sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86033,13 +87059,14 @@ class SubscribeAttributeTestClusterInt56s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt56sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt56sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86139,13 +87166,14 @@ class SubscribeAttributeTestClusterInt64s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeInt64sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeInt64sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86245,13 +87273,14 @@ class SubscribeAttributeTestClusterEnum8 : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEnum8WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEnum8WithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86351,13 +87380,14 @@ class SubscribeAttributeTestClusterEnum16 : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEnum16WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEnum16WithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86457,13 +87487,14 @@ class SubscribeAttributeTestClusterFloatSingle : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFloatSingleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFloatSingleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86563,13 +87594,14 @@ class SubscribeAttributeTestClusterFloatDouble : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFloatDoubleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFloatDoubleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86669,13 +87701,14 @@ class SubscribeAttributeTestClusterOctetString : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeOctetStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeOctetStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86786,13 +87819,14 @@ class SubscribeAttributeTestClusterListInt8u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeListInt8uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeListInt8uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86903,13 +87937,14 @@ class SubscribeAttributeTestClusterListOctetString : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeListOctetStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeListOctetStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87023,13 +88058,14 @@ class SubscribeAttributeTestClusterListStructOctetString : public SubscribeAttri MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeListStructOctetStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeListStructOctetStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87129,13 +88165,14 @@ class SubscribeAttributeTestClusterLongOctetString : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLongOctetStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLongOctetStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87237,13 +88274,14 @@ class SubscribeAttributeTestClusterCharString : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeCharStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeCharStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87345,13 +88383,14 @@ class SubscribeAttributeTestClusterLongCharString : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeLongCharStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeLongCharStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87451,13 +88490,14 @@ class SubscribeAttributeTestClusterEpochUs : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEpochUsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEpochUsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87557,13 +88597,14 @@ class SubscribeAttributeTestClusterEpochS : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEpochSWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEpochSWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87663,13 +88704,14 @@ class SubscribeAttributeTestClusterVendorId : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeVendorIdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeVendorIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87936,13 +88978,14 @@ class SubscribeAttributeTestClusterListNullablesAndOptionalsStruct : public Subs MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeListNullablesAndOptionalsStructWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeListNullablesAndOptionalsStructWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88042,13 +89085,14 @@ class SubscribeAttributeTestClusterEnumAttr : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeEnumAttrWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeEnumAttrWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88160,13 +89204,14 @@ class SubscribeAttributeTestClusterStructAttr : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeStructAttrWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeStructAttrWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88266,13 +89311,14 @@ class SubscribeAttributeTestClusterRangeRestrictedInt8u : public SubscribeAttrib MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRangeRestrictedInt8uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRangeRestrictedInt8uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88372,13 +89418,14 @@ class SubscribeAttributeTestClusterRangeRestrictedInt8s : public SubscribeAttrib MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRangeRestrictedInt8sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRangeRestrictedInt8sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88478,13 +89525,14 @@ class SubscribeAttributeTestClusterRangeRestrictedInt16u : public SubscribeAttri MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRangeRestrictedInt16uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRangeRestrictedInt16uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88584,13 +89632,14 @@ class SubscribeAttributeTestClusterRangeRestrictedInt16s : public SubscribeAttri MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeRangeRestrictedInt16sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeRangeRestrictedInt16sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88701,13 +89750,14 @@ class SubscribeAttributeTestClusterListLongOctetString : public SubscribeAttribu MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeListLongOctetStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeListLongOctetStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88741,7 +89791,9 @@ class ReadTestClusterListFabricScoped : public ReadAttribute { endpoint:@(endpointId) queue:callbackQueue]; MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } [cluster readAttributeListFabricScopedWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListFabricScoped response %@", [value description]); @@ -88871,13 +89923,14 @@ class SubscribeAttributeTestClusterListFabricScoped : public SubscribeAttribute MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeListFabricScopedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeListFabricScopedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88977,13 +90030,14 @@ class SubscribeAttributeTestClusterTimedWriteBoolean : public SubscribeAttribute MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeTimedWriteBooleanWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeTimedWriteBooleanWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89083,13 +90137,14 @@ class SubscribeAttributeTestClusterGeneralErrorBoolean : public SubscribeAttribu MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneralErrorBooleanWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneralErrorBooleanWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89189,13 +90244,14 @@ class SubscribeAttributeTestClusterClusterErrorBoolean : public SubscribeAttribu MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterErrorBooleanWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterErrorBooleanWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89295,13 +90351,14 @@ class SubscribeAttributeTestClusterUnsupported : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeUnsupportedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeUnsupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89401,13 +90458,14 @@ class SubscribeAttributeTestClusterNullableBoolean : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableBooleanWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableBooleanWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89507,13 +90565,14 @@ class SubscribeAttributeTestClusterNullableBitmap8 : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableBitmap8WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableBitmap8WithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89613,13 +90672,14 @@ class SubscribeAttributeTestClusterNullableBitmap16 : public SubscribeAttribute MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableBitmap16WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableBitmap16WithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89719,13 +90779,14 @@ class SubscribeAttributeTestClusterNullableBitmap32 : public SubscribeAttribute MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableBitmap32WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableBitmap32WithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89825,13 +90886,14 @@ class SubscribeAttributeTestClusterNullableBitmap64 : public SubscribeAttribute MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableBitmap64WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableBitmap64WithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89931,13 +90993,14 @@ class SubscribeAttributeTestClusterNullableInt8u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt8uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt8uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90037,13 +91100,14 @@ class SubscribeAttributeTestClusterNullableInt16u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt16uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt16uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90143,13 +91207,14 @@ class SubscribeAttributeTestClusterNullableInt24u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt24uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt24uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90249,13 +91314,14 @@ class SubscribeAttributeTestClusterNullableInt32u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt32uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt32uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90355,13 +91421,14 @@ class SubscribeAttributeTestClusterNullableInt40u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt40uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt40uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90461,13 +91528,14 @@ class SubscribeAttributeTestClusterNullableInt48u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt48uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt48uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90567,13 +91635,14 @@ class SubscribeAttributeTestClusterNullableInt56u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt56uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt56uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90673,13 +91742,14 @@ class SubscribeAttributeTestClusterNullableInt64u : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt64uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt64uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90779,13 +91849,14 @@ class SubscribeAttributeTestClusterNullableInt8s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt8sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt8sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90885,13 +91956,14 @@ class SubscribeAttributeTestClusterNullableInt16s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt16sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt16sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90991,13 +92063,14 @@ class SubscribeAttributeTestClusterNullableInt24s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt24sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt24sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91097,13 +92170,14 @@ class SubscribeAttributeTestClusterNullableInt32s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt32sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt32sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91203,13 +92277,14 @@ class SubscribeAttributeTestClusterNullableInt40s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt40sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt40sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91309,13 +92384,14 @@ class SubscribeAttributeTestClusterNullableInt48s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt48sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt48sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91415,13 +92491,14 @@ class SubscribeAttributeTestClusterNullableInt56s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt56sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt56sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91521,13 +92598,14 @@ class SubscribeAttributeTestClusterNullableInt64s : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableInt64sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableInt64sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91627,13 +92705,14 @@ class SubscribeAttributeTestClusterNullableEnum8 : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableEnum8WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableEnum8WithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91733,13 +92812,14 @@ class SubscribeAttributeTestClusterNullableEnum16 : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableEnum16WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableEnum16WithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91839,13 +92919,14 @@ class SubscribeAttributeTestClusterNullableFloatSingle : public SubscribeAttribu MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableFloatSingleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableFloatSingleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91945,13 +93026,14 @@ class SubscribeAttributeTestClusterNullableFloatDouble : public SubscribeAttribu MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableFloatDoubleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableFloatDoubleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92051,13 +93133,14 @@ class SubscribeAttributeTestClusterNullableOctetString : public SubscribeAttribu MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableOctetStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableOctetStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92159,13 +93242,14 @@ class SubscribeAttributeTestClusterNullableCharString : public SubscribeAttribut MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableCharStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableCharStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92265,13 +93349,14 @@ class SubscribeAttributeTestClusterNullableEnumAttr : public SubscribeAttribute MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableEnumAttrWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableEnumAttrWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92389,13 +93474,14 @@ class SubscribeAttributeTestClusterNullableStruct : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableStructWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableStructWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92496,13 +93582,14 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt8u : public Subscri MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableRangeRestrictedInt8uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92603,13 +93690,14 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt8s : public Subscri MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableRangeRestrictedInt8sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92711,13 +93799,14 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt16u : public Subscr MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableRangeRestrictedInt16uWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92819,13 +93908,14 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt16s : public Subscr MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeNullableRangeRestrictedInt16sWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92885,13 +93975,14 @@ class SubscribeAttributeTestClusterGeneratedCommandList : public SubscribeAttrib MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92951,13 +94042,14 @@ class SubscribeAttributeTestClusterAcceptedCommandList : public SubscribeAttribu MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -93017,13 +94109,14 @@ class SubscribeAttributeTestClusterAttributeList : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -93083,13 +94176,14 @@ class SubscribeAttributeTestClusterFeatureMap : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -93149,13 +94243,14 @@ class SubscribeAttributeTestClusterClusterRevision : public SubscribeAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - params.keepPreviousSubscriptions - = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; - params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; - [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.fabricFiltered = mFabricFiltered.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index a50a305eae221d..a829f8f8e892c0 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -613,7 +613,7 @@ class TestAccessControlCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeAclWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Error: %@", err); @@ -953,7 +953,7 @@ class TestAccessControlCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeAclWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Error: %@", err); @@ -1042,7 +1042,7 @@ class TestAccessControlCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeAclWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Error: %@", err); @@ -1121,7 +1121,7 @@ class TestAccessControlCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeAclWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Error: %@", err); @@ -1204,7 +1204,7 @@ class TestAccessControlCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeAclWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Error: %@", err); @@ -1291,7 +1291,7 @@ class TestAccessControlCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeAclWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Error: %@", err); @@ -1393,7 +1393,7 @@ class TestAccessControlCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeAclWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Error: %@", err); @@ -1575,7 +1575,7 @@ class TestAccessControlCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeAclWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Error: %@", err); @@ -1761,7 +1761,7 @@ class TestAccessControlCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeAclWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Error: %@", err); @@ -2088,7 +2088,7 @@ class TestAccessControlCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeAclWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Error: %@", err); @@ -66806,10 +66806,9 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { uint16_t minIntervalArgument = 4U; uint16_t maxIntervalArgument = 5U; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - [cluster subscribeAttributeOperationalStatusWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] - maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + [cluster subscribeAttributeOperationalStatusWithParams:params subscriptionEstablished:^{ VerifyOrReturn( testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); @@ -67809,10 +67808,9 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { uint16_t minIntervalArgument = 4U; uint16_t maxIntervalArgument = 5U; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - [cluster subscribeAttributeOperationalStatusWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] - maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + [cluster subscribeAttributeOperationalStatusWithParams:params subscriptionEstablished:^{ VerifyOrReturn( testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); @@ -68615,10 +68613,9 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { uint16_t minIntervalArgument = 4U; uint16_t maxIntervalArgument = 5U; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - [cluster subscribeAttributeOperationalStatusWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] - maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + [cluster subscribeAttributeOperationalStatusWithParams:params subscriptionEstablished:^{ VerifyOrReturn( testSendClusterTest_TC_WNCV_3_3_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); @@ -88764,10 +88761,9 @@ class TestCluster : public TestCommandBridge { uint16_t minIntervalArgument = 2U; uint16_t maxIntervalArgument = 5U; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - [cluster subscribeAttributeListInt8uWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] - maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + [cluster subscribeAttributeListInt8uWithParams:params subscriptionEstablished:^{ VerifyOrReturn( testSendClusterTestCluster_375_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); @@ -97597,10 +97593,9 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { uint16_t minIntervalArgument = 2U; uint16_t maxIntervalArgument = 5U; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - [cluster subscribeAttributeFabricsWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] - maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + [cluster subscribeAttributeFabricsWithParams:params subscriptionEstablished:^{ VerifyOrReturn(testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); @@ -98956,7 +98951,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeFabricsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read fabric list before setting label Error: %@", err); @@ -99019,7 +99014,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeFabricsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read fabric list after setting label Error: %@", err); @@ -100765,7 +100760,7 @@ class TestBinding : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeBindingWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read empty binding table Error: %@", err); @@ -100865,7 +100860,7 @@ class TestBinding : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeBindingWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read binding table (endpoint 1) Error: %@", err); @@ -100936,7 +100931,7 @@ class TestBinding : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeBindingWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read binding table (endpoint 0) Error: %@", err); @@ -100967,7 +100962,7 @@ class TestBinding : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeBindingWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify endpoint 1 not changed Error: %@", err); @@ -101673,7 +101668,7 @@ class TestArmFailSafe : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeFabricsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Query fabrics list Error: %@", err); @@ -105369,7 +105364,7 @@ class TestMultiAdmin : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:false]; + params.fabricFiltered = false; [cluster readAttributeFabricsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that we just have the one fabric and did not add a new one Error: %@", err); @@ -106717,10 +106712,9 @@ class TestSubscribe_OnOff : public TestCommandBridge { uint16_t minIntervalArgument = 2U; uint16_t maxIntervalArgument = 5U; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - [cluster subscribeAttributeOnOffWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] - maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] - params:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + [cluster subscribeAttributeOnOffWithParams:params subscriptionEstablished:^{ VerifyOrReturn( testSendClusterTestSubscribe_OnOff_2_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); @@ -129436,7 +129430,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeGroupKeyMapWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -129551,7 +129545,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeGroupTableWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -129723,7 +129717,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeGroupTableWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -129776,7 +129770,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = true; [cluster readAttributeGroupTableWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) {